/* --- CSS RESET & BASE STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f1f2f6;
    font-family: 'Pyidaungsu', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    padding: 20px;
}

.workspace {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
    align-items: flex-start;
}

/* --- ပင်မစာရွက် (ဗလာစာရွက်စတိုင်ကို Table အပြင်ဘက်တွင်သာ ထားသည်) --- */
.notebook-sheet {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    position: relative;
}

/* စာရွက်၏ ဘယ်ဘက်က အနားသတ်လိုင်းနီ */
.notebook-sheet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 65px; 
    width: 2px;
    height: 100%;
    background-color: #ff8585; 
    z-index: 1;
}

.main-paper {
    flex: 1;
    padding: 32px 30px 40px 85px;
}

.paper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ff8585;
    height: 42px;
    margin-bottom: 22px;
    padding-bottom: 5px;
}

.header-title-input {
    border: none;
    outline: none;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    width: 70%;
    background: transparent;
}

.date-box {
    font-size: 13px;
    color: #7f8c8d;
}

h2 {
    color: #2c3e50;
    font-size: 18px;
    margin: 15px 0 10px 0;
}

/* --- 🟨 TABLE DESIGN (ပုံပါအတိုင်း အဝါရောင် သေတ္တာကွက်ဒီဇိုင်းစစ်စစ်) --- */
.table-container {
    margin-bottom: 32px;
    position: relative;
    z-index: 2;
    overflow-x: auto;
}

.styled-table {
    width: 100%;
    border-collapse: collapse; /* ဘောင်လိုင်းများ ထပ်မနေစေရန် */
    text-align: center;
    background-color: #ffffff;
}

/* Table Cells - ပုံထဲကအတိုင်း ဘောင်လိုင်းအမည်းနှင့် နောက်ခံအဝါနုရောင် */
.styled-table td {
    border: 1px solid #000000; /* ထင်ရှားသော ဘောင်လိုင်းအမည်း */
    background-color: #ffffdd; /* ပုံထဲကအတိုင်း အဝါနုရောင် နောက်ခံ */
    height: 90px; /* စာလုံးပုံစံ အချိုးကျစေရန် အမြင့်ထိန်းထားခြင်း */
    padding: 8px 4px;
    vertical-align: middle;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* နောက်ဆုံးတန်းရှိ ကွက်လပ်များအတွက် ဘောင်နှင့်အရောင်ဖျောက်ခြင်း (ပုံပါအတိုင်း) */
.styled-table td.empty-cell {
    background-color: transparent !important;
    border: none !important;
    cursor: default;
}

.styled-table tr:hover td:not(.empty-cell) {
    background-color: #fffbbf; /* Hover မီးမောင်းထိုးပြခြင်း */
}

/* ဇယားကွက်ထဲက စာလုံးစတိုင်များ (ပုံပါအတိုင်း နေရာချခြင်း) */
.cell-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.char {
    font-size: 32px; /* ဗျည်းစာလုံးကြီးကြီး */
    color: #555555;  /* ပုံထဲကအတိုင်း ခဲရောင်ရင့်ရင့် */
    font-weight: normal;
    line-height: 1.1;
}

.name {
    font-size: 13px;
    color: #000000; /* ပုံထဲကအတိုင်း စာသားအမည်း */
    line-height: 1.2;
}

.ipa {
    font-size: 11px;
    color: #7f8c8d;
    font-family: monospace;
    margin-top: 2px;
}

/* ရခိုင်သရဇယားကွက် - ပုံစံတူညီအောင် ထိန်းထားသည် */
.vowel-row td {
    background-color: #fff4db; /* သရအတွက် အဝါရောင် ကွဲပြားမှု အနည်းငယ်သုံးသည် */
}

/* Footer */
.paper-footer {
    border-top: 1px solid #ff8585;
    height: 32px;
    line-height: 32px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #95a5a6;
    margin-top: 20px;
}

/* Menu */
.menu-paper {
    width: 250px;
    padding: 32px 15px 30px 85px;
    position: sticky;
    top: 20px;
}

.menu-title {
    font-size: 15px;
    font-weight: bold;
    color: #ff8585;
    margin-bottom: 15px;
    border-bottom: 1px solid #ff8585;
    padding-bottom: 5px;
}

.menu-item-btn {
    background: none;
    border: none;
    display: block;
    width: 100%;
    text-align: left;
    height: 32px;
    line-height: 32px;
    font-size: 14px;
    color: #34495e;
    cursor: pointer;
    font-family: inherit;
}

.menu-item-btn:hover {
    color: #ff8585;
    font-weight: bold;
}

/* 📱 PHONE RESPONSIVE STYLES */
@media (max-width: 768px) {
    body { padding: 0; }
    .workspace { flex-direction: column; padding: 12px; }
    .menu-paper { display: none; }
    .main-paper { padding: 20px 12px 30px 65px; width: 100%; }
    .notebook-sheet::before { left: 50px; }
    
    .char { font-size: 26px; }
    .name { font-size: 11px; }
    .styled-table td { height: 80px; }
}

/* 🖨️ PRINT STYLES */
@media print {
    body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .menu-paper { display: none !important; }
    .styled-table td { background-color: #ffffdd !important; border: 1px solid #000000 !important; }
}