/* --- Variables & Core Setup --- */
:root {
    --bg-dark: #0f172a;
    --bg-brown: #794b07;
    --text-light: #f8fafc;
    --accent-gold: #fbbf24;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --card-bg: rgba(15, 23, 42, 0.7);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-brown) 0%, var(--bg-dark) 50%, var(--bg-brown) 100%);
    background-attachment: fixed;
    color: var(--text-light);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-user-select: none;
    user-select: none;
    overflow-x: hidden;
}

/* --- Header Brand Section --- */
.brand {
    display: flex;
    /* Logo နှင့် စာသားများကို ဘေးတိုက်စီရန် */
    align-items: center;
    /* Logo နှင့် စာသားအုပ်စုကို အပေါ်အောက် အလယ်ဗဟိုညှိရန် */
    justify-content: center;
    /* Header တစ်ခုလုံးကို စာမျက်နှာအလယ်တွင်ထားရန် */
    gap: 15px;
    /* Logo နှင့် စာသားကြား အကွာအဝေး */
    max-width: 600px;
    margin: 0 auto;
}

/* စာသားအုပ်စုအတွက် Container */
.brand-text {
    display: flex;
    flex-direction: column;
    /* Title နှင့် Subtitle ကို ဒေါင်လိုက်စီရန် */
    align-items: flex-start;
    /* စာသားအစချင်း (ဘယ်ဘက်အနား) ကို ဒေါင်လိုက်တစ်တန်းတည်း ညှိရန် */
    text-align: left;
    /* စာသားများကို ဘယ်ဘက်ကပ်ရန် */
}

.brand img {
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    display: block;
    margin: 0;
    /* မလိုအပ်သော Margin များ ဖယ်ရှားရန် */
}

.app-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    /* Title အောက်က Space ဖယ်ရန် */
    color: #fff;
}

.app-subtitle {
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin: 2px 0 0 0;
    /* Title နှင့် Subtitle ကြား အကွာအဝေးအနည်းငယ်သာထားရန် */
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Mobile Screen များအတွက် */
@media (max-width: 480px) {
    .app-title {
        font-size: 1.15rem;
    }

    .app-subtitle {
        font-size: 0.75rem;
    }

    .brand img {
        width: 40px;
        height: 40px;
    }
}

/* --- Main Layout ပေါင်းစည်းလိုက်ခြင်း --- */
.app-main {
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 16px;
    flex: 1;
    /* overflow-y: auto; ကို ဖယ်လိုက်ပါ သို့မဟုတ် ပိတ်ထားပါ */
    /* sticky အလုပ်လုပ်ဖို့အတွက် မိဘ container မှာ overflow hidden/auto မရှိတာ အကောင်းဆုံးပါ */
}

.search-box {
    display: flex;
    background: white;
    padding: 5px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;

    /* --- Sticky ဖြစ်စေရန် ဤ (၃) ကြောင်းထည့်ပါ --- */
    position: -webkit-sticky;
    /* Safari အတွက် */
    position: sticky;
    top: 15px;
    /* အပေါ်ကနေ ဘယ်လောက်အကွာမှာ ကပ်နေမလဲ (စိတ်ကြိုက်ပြင်နိုင်သည်) */
    z-index: 100;
    /* တခြားစာသားတွေရဲ့ အပေါ်မှာ ရှိနေစေရန် */
}

.search-box input {
    flex: 1;
    border: none;
    padding: 12px;
    outline: none;
    font-size: 16px;
}

.icon-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
}

.results-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 12px;
}

/* Result Card Design */
.card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.term-main {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.term-sub {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.pronunciation {
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: #f3f4f6;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}