/* ═══════════════════════════════════════════════════════
   WIN SHEIN's Diary — UI Fixed Version
   Features: Glassmorphism, Smooth Animations, Responsive Cards
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --primary:      #8B5E3C;
    --primary-light: #A67B5E;
    --accent:       #C9956A;
    --accent-light: #E5B99C;
    --text-main:    #2C1A0E;
    --text-soft:    #5C4030;
    --text-muted:   #9C7B63;
    --bg-body:      #FAF3EA;
    --bg-card:      #FFFFFF;
    --bg-sidebar:   #24190E;
    --border:       #E8D9C8;
    --shadow-sm:    0 4px 12px rgba(44, 26, 14, 0.08);
    --shadow-md:    0 8px 24px rgba(44, 26, 14, 0.12);
    --shadow-lg:    0 16px 32px rgba(44, 26, 14, 0.16);
    --sidebar-w:    280px;
    --topbar-h:     64px;
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-lg:    20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background: var(--bg-body);
    min-height: 100vh;
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   SIDEBAR FIXES - Premium Dark
══════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: linear-gradient(165deg, var(--bg-sidebar) 0%, #2F2013 100%);
    display: flex;
    flex-direction: column;
    padding: 32px 20px;
    position: fixed;
    top: 0; left: 0;
    z-index: 150;
    border-right: 1px solid rgba(255, 215, 180, 0.1);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

/* Sidebar Brand - Fixed Layout */
.sidebar-brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 215, 180, 0.15);
}

.brand-title {
    text-decoration: none;
}

.brand-text {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: #F5ECD9;
    letter-spacing: -0.5px;
    display: block;
    line-height: 1.2;
}

.brand-sub {
    color: #A78E7A;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

/* Admin Link in Sidebar */
.admin-link {
    color: #A78E7A;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    position: relative;
}

.admin-link:hover {
    background: rgba(201, 149, 106, 0.15);
    color: var(--accent);
}

.admin-tooltip {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-sidebar);
    color: #FFE4C8;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid rgba(255, 215, 180, 0.1);
}

.admin-link:hover .admin-tooltip {
    opacity: 1;
}

/* Navigation */
.nav-label {
    color: #A78E7A;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-left: 12px;
}

.sidebar-nav ul {
    list-style: none;
    margin-bottom: 24px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #D4B898;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    position: relative;
}

.nav-arrow {
    margin-left: auto;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s;
}

.nav-item:hover .nav-arrow,
.nav-item.active .nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

.nav-item .material-icons {
    font-size: 20px;
    color: #A78E7A;
    transition: color 0.2s;
}

.nav-item.active, .nav-item:hover {
    color: #FFE4C8;
    background: rgba(201, 149, 106, 0.15);
}

.nav-item.active .material-icons,
.nav-item:hover .material-icons {
    color: var(--accent);
}

/* Link Cards in Sidebar */
.sidebar-cards {
    margin: 24px 0;
}

.link-card { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 14px 16px; 
    background: rgba(255, 255, 255, 0.05); 
    border-radius: var(--radius-md); 
    text-decoration: none !important; /* အပြာရောင်မျဉ်းသားခြင်းကို ဖျောက်ရန် */
    margin-bottom: 10px; 
    border: 1px solid rgba(255, 215, 180, 0.08); 
    transition: all 0.2s; 
}

.link-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(201, 149, 106, 0.3);
}

.link-card-icon {
    width: 36px;
    height: 36px;
    background: rgba(201, 149, 106, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent);
}

.link-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.link-card-title { 
    color: #FFE4C8 !important; 
    font-size: 14px; 
    font-weight: 500; 
}

.link-card-url { 
    color: #A78E7A !important; 
    font-size: 12px; 
}

.link-card-desc {
    color: #A78E7A;
    font-size: 11px;
}

.link-card-arrow {
    color: #A78E7A;
    font-size: 16px;
    transition: transform 0.2s;
}

.link-card:hover .link-card-arrow {
    transform: translate(2px, -2px);
    color: var(--accent);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

.visitor-counter {
    background: rgba(255, 255, 255, 0.06);
    padding: 12px 16px;
    border-radius: 30px;
    font-size: 13px;
    color: #D4B898;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 215, 180, 0.1);
    margin-bottom: 12px;
}

.visitor-counter .material-icons {
    font-size: 16px;
}

.sidebar-copy {
    color: #A78E7A;
    font-size: 12px;
}

/* ══════════════════════════════════════════════════════
   MOBILE TOP BAR - Fixed
══════════════════════════════════════════════════════ */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: rgba(36, 25, 14, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 200;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 215, 180, 0.15);
}

.mobile-brand {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: #F5ECD9;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.mobile-admin { 
    color: #A78E7A; 
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s;
}

.mobile-admin:hover { 
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

/* Hamburger Button */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.hamburger:hover { background: rgba(255, 255, 255, 0.1); }

.hamburger span {
    display: block;
    height: 2px;
    background: #E5B99C;
    width: 24px;
    transition: all 0.3s;
}

.hamburger.is-open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
    transform: translateX(-5px);
}

.hamburger.is-open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 149;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.3s;
}

.sidebar-overlay.active { display: block; }

/* ══════════════════════════════════════════════════════
   MAIN CONTENT & POST CARDS - Fixed Layout
══════════════════════════════════════════════════════ */
.site-wrapper { 
    display: flex; 
    min-height: 100vh;
}

.main-wrap {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 40px 48px;
    min-width: 0;
    max-width: calc(1200px + var(--sidebar-w));
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-wrap main {
    flex: 1; /* ဒါက Footer ကို အောက်ဆုံးထိ တွန်းပို့ပေးပါလိမ့်မယ် */
}

/* Post Cards - Fixed */
.post-card {
    display: flex;
    gap: 24px;
    background: var(--bg-card);
    padding: 24px;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: flex-start;
    position: relative;
}

.post-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 4px 0 0 4px;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-light);
}

/* Thumbnail */
.post-thumbnail {
    width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    border: 2px solid var(--border);
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.post-card:hover .post-thumbnail {
    border-color: var(--accent);
    transform: scale(1.02);
}

/* Post Details - Fixed */
.post-details { 
    flex: 1;
    min-width: 0;
}

.post-details h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-details h2 a { 
    text-decoration: none; 
    color: var(--text-main);
    transition: color 0.2s;
    display: inline-block;
}

.post-details h2 a:hover { color: var(--primary); }

/* Meta Info */
.post-details .date {
    color: var(--text-muted);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.post-category {
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    background: rgba(201, 149, 106, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
}

.content { 
    font-size: 15px; 
    color: var(--text-soft); 
    line-height: 1.7;
    margin: 12px 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More */
.read-more {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.read-more:hover {
    gap: 10px;
    color: var(--accent);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: 16px;
}

/* Footer */
.main-wrap footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE FIXES
══════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .main-wrap { 
        padding: 32px 24px; 
    }
    
    .post-thumbnail {
        width: 160px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .mobile-topbar { 
        display: flex; 
    }
    
    .sidebar { 
        transform: translateX(-100%);
        box-shadow: none;
        padding: 24px 16px;
    }
    
    .sidebar.open { 
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
    }
    
    .main-wrap { 
        margin-left: 0; 
        padding: 84px 20px 32px;
    }
    
    .post-card {
        padding: 20px;
        gap: 16px;
    }
    
    .post-thumbnail { 
        width: 120px; 
        height: 90px; 
    }
    
    .post-details h2 { 
        font-size: 20px; 
    }
    
    .content { 
        -webkit-line-clamp: 2; 
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .post-card {
        flex-direction: column;
    }
    
    .post-thumbnail { 
        width: 100%; 
        height: 200px; 
    }
    
    .post-details h2 { 
        font-size: 22px; 
    }
}

@media (max-width: 480px) {
    .main-wrap {
        padding: 74px 16px 24px;
    }
    
    .post-card {
        padding: 16px;
    }
    
    .post-thumbnail { 
        height: 180px; 
    }
    
    .post-details h2 { 
        font-size: 20px; 
    }
    
    .content { 
        -webkit-line-clamp: 3;
    }
}