:root {
    --bg-color: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --text-main: #334155;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    min-height: 100vh;
    background-attachment: fixed;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Navbar */
header.glass-navbar {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    margin-right: 1.5rem;
    transition: color 0.2s;
}
header a:hover {
    color: var(--accent);
}

/* Typography */
h1, h2, h3 {
    margin-top: 0;
    color: #1e293b;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Post Card */
.elegant-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.3) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 2.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}
.elegant-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
}
.elegant-card:hover::before {
    left: 150%;
}
.elegant-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(31, 38, 135, 0.15);
}
.post-meta {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.post-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 800;
}
.post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}
.post-title a:hover {
    color: transparent;
    background: linear-gradient(90deg, var(--accent), #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
}
.post-excerpt {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 1.5rem;
}
.btn-readmore {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-readmore:hover {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Sidebar Treeview */
.treeview ul {
    list-style: none;
    padding-left: 1rem;
}
.treeview li {
    margin-bottom: 0.5rem;
}
.treeview .year {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

/* Buttons & Inputs */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}
.btn:hover {
    background: var(--accent-hover);
    text-decoration: none;
}
.btn-danger {
    background: #ef4444;
}
.btn-danger:hover {
    background: #dc2626;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    color: var(--text-main);
    box-sizing: border-box;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.8);
}

/* Admin Table */
table.admin-table {
    width: 100%;
    border-collapse: collapse;
}
table.admin-table th, table.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
table.admin-table th {
    font-weight: 600;
}
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-published { background: #dcfce7; color: #166534; }
.badge-draft { background: #fef3c7; color: #92400e; }

.user-management-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-main);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 3px;
}

/* Modal Popup Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .post-title {
        font-size: 1.4rem;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    
    /* Mobile Menu Logic */
    .hamburger {
        display: block;
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 2rem;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        display: none;
    }
    
    nav.active {
        display: flex;
    }
    
    header a {
        margin-right: 0;
        margin-bottom: 1rem;
        display: block;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    header a:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
}
