:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) var(--bg-dark);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: clip;
    /* Custom Default Cursor (Cyan Circle) */
    cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='3' fill='%2300ffd5'/%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%2300ffd5' stroke-width='1.5' opacity='0.7'/%3E%3C/svg%3E") 12 12, auto;
}

a, button, .post-card, .chat-btn, input[type='submit'], .menu-toggle {
    /* Custom Pointer Cursor (Neon Pink Dashed Circle) for links and buttons */
    cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='4' fill='%23ff007f'/%3E%3Ccircle cx='12' cy='12' r='11' fill='none' stroke='%23ff007f' stroke-width='2' stroke-dasharray='4 3' opacity='0.9'/%3E%3C/svg%3E") 12 12, pointer !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Glassmorphism Effect */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

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

/* Header & Nav */
header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    transition: box-shadow 0.3s ease, border-bottom 0.3s ease, padding 0.3s ease;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    padding: 0.8rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--glass-border);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
    white-space: nowrap;
    transition: var(--transition);
    text-decoration: none;
}

header.scrolled .logo {
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Submenu Styles */
.has-submenu {
    position: relative;
    padding-bottom: 5px; /* Tiny gap to prevent mouse-out */
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    display: flex; /* Horizontal layout */
    gap: 15px;
    padding: 0.8rem 1.2rem;
    margin: 0;
    list-style: none;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    margin-top: 10px;
    border: 1px solid var(--glass-border);
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.has-submenu svg {
    transition: transform 0.3s ease;
}

.has-submenu:hover svg {
    transform: rotate(180deg);
}

.submenu li {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.submenu li a {
    padding: 0.5rem 1rem;
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    border-radius: 6px;
}

.submenu li a:hover,
.submenu li a.active {
    background: rgba(59, 130, 246, 0.2);
    color: white;
    transform: translateY(-2px); /* Vertical pop instead of horizontal slide */
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Post Cards */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.post-card {
    padding: 0;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.post-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.post-card-content {
    padding: 1.5rem;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px -10px rgba(59, 130, 246, 0.2);
}

.post-card .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.post-card h3 {
    margin-bottom: 1rem;
}

.post-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Responsive Navigation */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.menu-toggle .icon-close { display: none; }
.menu-toggle.active .icon-menu { display: none; }
.menu-toggle.active .icon-close { display: block; }

.menu-toggle.active {
    transform: rotate(90deg);
}

/* Hide search bar on tablets before mobile menu kicks in */
@media (max-width: 1024px) and (min-width: 769px) {
    .search-menu-item {
        display: none;
    }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    .nav-links.active { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .search-menu-item { width: 100%; }
    .nav-links form { margin-left: 0 !important; width: 100%; }
    .search-input { width: 100%; }
    .search-input:focus { width: 100%; }
}

/* Admin Styles */
.admin-container {
    padding: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

input, textarea, select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1.5rem;
    background: rgba(30, 41, 59, 1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Admin Forms */
.admin-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group .hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: -1.2rem;
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Custom Checkbox/Toggle for Status/Featured */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--glass-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(24px);
    background-color: white;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    justify-content: flex-end;
}

/* Admin Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

.admin-table th {
    padding: 1.2rem 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
}

.admin-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-size: 0.95rem;
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Action Buttons & Badges */
.table-actions { display: flex; gap: 0.6rem; align-items: center; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; border-radius: 8px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 5px; text-decoration: none; transition: var(--transition); }

.btn-edit { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.btn-edit:hover { background: #3b82f6; color: white; border-color: #3b82f6; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); transform: translateY(-2px); }

.btn-delete { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-delete:hover { background: #ef4444; color: white; border-color: #ef4444; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3); transform: translateY(-2px); }

.badge { padding: 0.35rem 0.8rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }

/* Homepage Layout */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .home-layout { gap: 2rem; }
}

@media (max-width: 850px) {
    .home-layout { 
        grid-template-columns: 1fr;
    }
    .featured {
        grid-template-columns: 1fr !important;
    }
    .featured img { height: 250px !important; }
}

.sidebar-section {
    margin-bottom: 2.5rem;
}

.sidebar-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-left: 3px solid var(--primary);
    padding-left: 10px;
}

/* Chat Widget */
.chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.chat-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    transition: var(--transition);
    animation: chatPulse 2s infinite;
}

@keyframes chatPulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.chat-btn:hover { transform: scale(1.1); }

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 1rem;
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    font-size: 0.9rem;
}

.msg {
    margin-bottom: 0.5rem;
    padding: 0.8rem 1.2rem;
    border-radius: 18px;
    max-width: 80%;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
}

.msg-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 1rem;
}

.msg-wrapper-user { flex-direction: row-reverse; }

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--glass-border);
    flex-shrink: 0;
    object-fit: cover;
    border: 1px solid var(--glass-border);
}

.msg-bot { 
    background: rgba(255,255,255,0.08); 
    border-bottom-left-radius: 4px;
    color: var(--text-main);
}
.msg-user { 
    background: var(--primary); 
    color: white; 
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.chat-input-area input { margin-bottom: 0; padding: 0.5rem; }

/* Article Detail */
.article-cover {
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .article-cover { height: 300px; }
    article h1 { font-size: 2.2rem !important; }
    .post-card { height: auto !important; flex-direction: column !important; }
    .post-card-img { width: 100% !important; height: 180px !important; }
}

code {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
}

/* Premium Code Block with Header */
.code-container {
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.code-header {
    background: #1e293b;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.code-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

pre {
    background: transparent !important;
    padding: 1.5rem !important;
    margin: 0 !important;
    border: none !important;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--primary);
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
}

.copy-btn.copied {
    background: #10b981;
    color: white;
}

/* Search UI */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0.6rem 1.2rem;
    padding-right: 3rem;
    color: white;
    font-size: 0.9rem;
    width: 200px;
    transition: var(--transition);
    margin-bottom: 0;
}

.search-input:focus {
    width: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 5px;
}

.search-btn:hover {
    color: var(--primary);
}

.results-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.results-header span {
    color: var(--primary);
    font-weight: 600;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1999;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
}

/* Reading Progress Bar */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 1001; /* Slightly higher than sticky header (1000) */
}

.reading-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Cursor Follower Glow Effect */
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    margin-top: -20px;
    background: rgba(0, 255, 213, 0.4); /* Cyan mờ ảo */
    filter: blur(15px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s ease, height 0.3s ease, background 0.3s ease, margin 0.3s ease;
    will-change: transform;
}

.cursor-follower.active {
    width: 80px;
    height: 80px;
    margin-left: -40px;
    margin-top: -40px;
    background: rgba(255, 0, 127, 0.5); /* Hồng rực rỡ khi chỉ vào link */
    filter: blur(25px);
}

/* Tắt hiệu ứng trên điện thoại / máy tính bảng vì không có chuột */
@media (hover: none) and (pointer: coarse) {
    .cursor-follower {
        display: none !important;
    }
}

/* Cursor Particles */
.cursor-particle {
    position: fixed;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    margin-left: -2.5px;
    margin-top: -2.5px;
    animation: particleFade 0.8s ease-out forwards;
    will-change: transform, opacity;
}

@keyframes particleFade {
    0% { opacity: 0.8; transform: scale(1) translate(0, 0); }
    100% { opacity: 0; transform: scale(0) translate(var(--tx), var(--ty)); }
}

/* Cursor Ripple Effect */
.cursor-ripple {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    animation: rippleAnim 0.6s ease-out forwards;
}

@keyframes rippleAnim {
    0% { width: 0; height: 0; border-width: 4px; opacity: 0.8; }
    100% { width: 120px; height: 120px; border-width: 1px; opacity: 0; }
}

/* Pagination Styles */
.pagination {
    display: flex;
    gap: 12px;
    margin-top: 4rem;
    justify-content: center;
    align-items: center;
}

.page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.page-link.page-nav {
    width: auto;
    padding: 0 1.2rem;
    border-radius: 8px;
}

.page-link:hover, .page-link.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-4px);
}

/* Sidebar Layout for Admin */
.admin-layout { display: flex; min-height: 100vh; flex-direction: row; padding: 0; margin: 0; }

.sidebar { 
    width: 280px; 
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid rgba(255, 255, 255, 0.08); 
    padding: 2rem 1.5rem; 
    flex-shrink: 0; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
    z-index: 100;
}

.sidebar-header { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 2rem; 
    padding-bottom: 1.5rem; 
    border-bottom: 1px solid rgba(255,255,255,0.06); 
}

.sidebar .logo { 
    font-size: 1.6rem; 
    font-weight: 800; 
    background: linear-gradient(90deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.sidebar-toggle { display: none; background: none; border: none; color: white; cursor: pointer; padding: 5px; }
.sidebar .nav-links { display: flex; flex-direction: column; gap: 0.4rem; flex-grow: 1; }
.sidebar .nav-links a { 
    color: var(--text-muted); 
    text-decoration: none; 
    padding: 0.9rem 1.2rem; 
    border-radius: 12px; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    align-items: center; 
    justify-content: flex-start; 
    gap: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}
.sidebar .nav-links a svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.sidebar .nav-links a:hover svg {
    opacity: 1;
    transform: scale(1.1);
}
.sidebar .nav-links a.active svg {
    opacity: 1;
}
.sidebar .nav-links a:hover { 
    background: rgba(255,255,255,0.06); 
    color: white; 
    transform: translateX(4px);
}
.sidebar .nav-links a.active { 
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0) 100%); 
    color: #60a5fa !important; 
    font-weight: 600; 
    border-left: 3px solid #60a5fa;
    box-shadow: inset 1px 0 10px rgba(59, 130, 246, 0.05);
}
.sidebar .nav-links a[href*="logout.php"] { margin-top: auto; color: #ef4444 !important; background: rgba(239, 68, 68, 0.05); border: 1px solid rgba(239, 68, 68, 0.1); border-left: none; }
.sidebar .nav-links a[href*="logout.php"]:hover { background: rgba(239, 68, 68, 0.15); color: #f87171 !important; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.3); }
.main-content { flex: 1; padding: 2.5rem 3rem; overflow-y: auto; overflow-x: hidden; background: #0f172a; }

@media (max-width: 992px) {
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); padding: 1rem 1.5rem; flex-direction: column; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
    .sidebar-header { justify-content: space-between; margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
    .sidebar-toggle { display: block; }
    .sidebar .nav-links { display: none; flex-direction: column; padding-top: 1.5rem; gap: 0.5rem; }
    .sidebar .nav-links.active { display: flex; }
    .sidebar .nav-links a[href*="logout.php"] { margin-top: 1rem; }
    .main-content { padding: 1.5rem; }
}
