/* TeachCloud – Software Engineer Edition */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* ── Dark IDE palette (default) ── */
    --bg-primary:   #0d1117;   /* GitHub-dark canvas */
    --bg-secondary: #161b22;   /* panel */
    --bg-tertiary:  #1c2333;   /* input / hover */
    --bg-card:      #161b22;
    --border-color: rgba(48, 54, 61, 0.9);
    --border-hover: rgba(0, 212, 255, 0.35);
    --text-primary:   #e6edf3;
    --text-secondary: #8b949e;
    --text-muted:     #484f58;

    /* cyan → violet – the "developer tools" gradient */
    --accent-cyan:    #00d4ff;
    --accent-violet:  #a855f7;
    --accent-blue:    #58a6ff;   /* links */
    --accent-emerald: #3fb950;   /* success / green badges */
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #a855f7 100%);
    --accent-glow:     rgba(0, 212, 255, 0.25);
    --accent-glow-v:   rgba(168, 85, 247, 0.25);

    --card-bg:      rgba(22, 27, 34, 0.85);
    --card-shadow:  0 8px 32px rgba(0,0,0,.55);
    --navbar-bg:    rgba(13, 17, 23, 0.88);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Smooth Screen Background & Color Transition ── */
body, .navbar, .card, .post-card, .user-dropdown, footer, .weather-time-widget, .form-input, .form-textarea, .theme-panel {
    transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.35s ease,
                color 0.3s ease,
                box-shadow 0.35s ease;
}

/* ── Light IDE palette ── */
[data-theme="light"] {
    --bg-primary:   #f6f8fa;
    --bg-secondary: #ffffff;
    --bg-tertiary:  #eaeef2;
    --bg-card:      #ffffff;
    --border-color: rgba(31, 35, 40, 0.15);
    --border-hover: rgba(0, 162, 194, 0.4);
    --text-primary:   #1f2328;
    --text-secondary: #656d76;
    --text-muted:     #9198a1;

    --accent-cyan:    #0969da;
    --accent-violet:  #8250df;
    --accent-blue:    #0969da;
    --accent-emerald: #1a7f37;
    --accent-gradient: linear-gradient(135deg, #0969da 0%, #8250df 100%);
    --accent-glow:    rgba(9, 105, 218, 0.18);
    --accent-glow-v:  rgba(130, 80, 223, 0.18);

    --card-bg:     rgba(255,255,255,0.92);
    --card-shadow: 0 4px 20px rgba(31,35,40,.08);
    --navbar-bg:   rgba(246,248,250,0.9);
}

/* ── Midnight OLED Deep Black palette ── */
[data-theme="midnight"] {
    --bg-primary:   #000000;
    --bg-secondary: #080c14;
    --bg-tertiary:  #0f172a;
    --bg-card:      #050811;
    --border-color: rgba(255, 255, 255, 0.14);
    --border-hover: rgba(0, 212, 255, 0.5);
    --text-primary:   #ffffff;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;

    --accent-cyan:    #00e5ff;
    --accent-violet:  #c084fc;
    --accent-blue:    #38bdf8;
    --accent-emerald: #10b981;
    --accent-gradient: linear-gradient(135deg, #00e5ff 0%, #c084fc 100%);
    --accent-glow:    rgba(0, 229, 255, 0.3);
    --accent-glow-v:  rgba(192, 132, 252, 0.3);

    --card-bg:     rgba(8, 12, 20, 0.95);
    --card-shadow: 0 12px 40px rgba(0,0,0,.85);
    --navbar-bg:   rgba(0,0,0,0.92);
}

/* ── Custom Screen Accents ── */
[data-accent="emerald"] {
    --accent-cyan:    #3fb950 !important;
    --accent-blue:    #2ea043 !important;
    --accent-glow:    rgba(63, 185, 80, 0.28) !important;
    --accent-gradient: linear-gradient(135deg, #3fb950 0%, #10b981 100%) !important;
}

[data-accent="violet"] {
    --accent-cyan:    #c084fc !important;
    --accent-blue:    #a855f7 !important;
    --accent-glow:    rgba(168, 85, 247, 0.28) !important;
    --accent-gradient: linear-gradient(135deg, #c084fc 0%, #a855f7 100%) !important;
}

[data-accent="amber"] {
    --accent-cyan:    #fbbf24 !important;
    --accent-blue:    #f59e0b !important;
    --accent-glow:    rgba(245, 158, 11, 0.28) !important;
    --accent-gradient: linear-gradient(135deg, #fbbf24 0%, #ea580c 100%) !important;
}

[data-accent="blue"] {
    --accent-cyan:    #38bdf8 !important;
    --accent-blue:    #0284c7 !important;
    --accent-glow:    rgba(2, 132, 199, 0.28) !important;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
}

/* Basic Reset & Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    /* Subtle dot-grid — IDE / terminal feel */
    background-image: radial-gradient(rgba(88,166,255,.04) 1px, transparent 1px);
    background-size: 28px 28px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-feature-settings: 'kern' 1, 'liga' 1;
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

/* Monospace accent for h1 — feels like an IDE title */
h1 { font-family: var(--font-mono); font-size: clamp(1.5rem,3.5vw,2.4rem); }

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--text-primary); }

/* Base Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Navbar — IDE top-bar style ── */
.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 100;
    background: var(--navbar-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-color);
    /* thin cyan accent line at very top */
    box-shadow: 0 1px 0 0 var(--border-color),
                inset 0 1px 0 0 rgba(0,212,255,.06);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1380px;
    width: 100%;
    margin: 0 auto;
}

/* ── Logo: transparent icon + monospace wordmark ── */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    flex-shrink: 0;
    /* NO background, NO text-fill here — handled on children */
}

/* The PNG icon — transparent, no frame */
.logo-icon {
    display: block;
    width: 122px;
    height: 96px;
    object-fit: contain;
    /* no border-radius, no background, no shadow */
    flex-shrink: 0;
    /* slight scale-up on hover */
    transition: transform 0.2s ease;
}
.logo:hover .logo-icon {
    /*transform: scale(1.12) rotate(-4deg);*/
}

/* Wordmark text */
.logo-word {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* "Cloud" — lighter weight inside the wordmark */
.logo-word-accent {
    font-weight: 400;
    opacity: 0.85;
    /* inherits gradient from parent via background-clip */
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 0 auto;
}

.nav-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Icons styling */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
    .user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 999px;               /* pill shape */
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
    cursor: pointer;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition);
    max-width: 180px;                   /* hard cap — never spills */
    white-space: nowrap;
}

.user-menu-btn:hover {
    border-color: var(--border-hover);
    background: var(--card-bg);
}

/* Gradient initial circle */
.nav-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Truncated username label */
.nav-username {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
}

/* Animated chevron */
.nav-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.user-menu:hover .nav-chevron,
.user-menu.active .nav-chevron,
.user-menu-btn[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0 12px 32px rgba(0,0,0,.35);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

/* Invisible bridge over the 6px gap to prevent hover flicker */
.user-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

/* Role label header inside dropdown */
.nav-dropdown-label {
    display: block;
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    padding: .65rem 1rem .3rem;
}

/* Divider line before Logout */
.nav-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: .35rem 0;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1rem;
    font-size: .88rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background .15s;
}

.user-dropdown a:hover {
    background: var(--bg-tertiary);
}

/* Logout link in red tint */
.user-dropdown .nav-logout {
    color: #f87171;
}
.user-dropdown .nav-logout:hover {
    background: rgba(239, 68, 68, .08);
}

.user-menu:hover .user-dropdown,
.user-menu.active .user-dropdown {
    display: block;
}

/* IP-restricted padlock indicator */
.nav-ip-lock {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: default;
    opacity: 0.7;
    transition: var(--transition);
    user-select: none;
}

.nav-ip-lock:hover {
    opacity: 1;
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}
/* current page clicked or highlighted with underline*/
.nav-item {
    position: relative;
    text-decoration: none;
}

.nav-item.active {
    color: var(--accent-cyan);
}
.nav-item.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-gradient);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.btn-icon:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ── Proximity & Hover Theme Control System ── */
.theme-control-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.theme-toggle-btn {
    border-radius: 50% !important; /* Elegant circle button */
    width: 38px;
    height: 38px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.theme-control-wrapper:hover .theme-toggle-btn,
.theme-control-wrapper.proximity .theme-toggle-btn {
    transform: scale(1.08);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 14px var(--accent-glow), 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.theme-btn-pulse {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 6px var(--accent-cyan);
    pointer-events: none;
}

/* Glassmorphic Dropdown Panel */
.theme-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: -10px;
    width: 250px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.9rem;
    z-index: 1100;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: panelPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Show on hover of wrapper or when opened via click */
.theme-control-wrapper:hover .theme-panel,
.theme-control-wrapper.open .theme-panel {
    display: block;
}

/* Invisible hover bridge to prevent flicker */
.theme-panel::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

@keyframes panelPop {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.theme-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.theme-panel-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.theme-status-tag {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    font-weight: 600;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--accent-cyan);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.theme-modes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
}

.theme-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.6rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.theme-mode-btn:hover {
    border-color: var(--accent-cyan);
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.theme-mode-btn.active {
    border-color: var(--accent-cyan);
    background: var(--bg-secondary);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-glow);
    font-weight: 600;
}

.theme-mode-icon {
    font-size: 0.88rem;
}

.theme-panel-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.65rem 0;
}

.theme-accents-section {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.theme-accent-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-swatches {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.theme-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--swatch-color);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

.theme-swatch:hover {
    transform: scale(1.22);
    box-shadow: 0 0 10px var(--swatch-color);
}

.theme-swatch.active {
    border-color: #ffffff;
    box-shadow: 0 0 12px var(--swatch-color), 0 0 0 2px var(--border-color);
    transform: scale(1.15);
}

/* ── Navigation Tools Group & Navbar Controls ── */
.nav-tools-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-left: 2rem; /* Clean spacing between search bar and date/time widget */
    flex-shrink: 0;
}

@media (min-width: 1200px) {
    .nav-tools-group {
        margin-left: 2.5rem; /* Generous breathing room on large displays */
    }
}

@media (max-width: 1200px) and (min-width: 992px) {
    .nav-links {
        gap: 0.9rem;
    }
    .search-wrapper {
        width: 220px;
    }
    .nav-tools-group {
        margin-left: 1.5rem;
        gap: 0.65rem;
    }
}

/* ── Live Date, Time & Temperature Widget ── */
.weather-time-widget {
    display: inline-flex;
    align-items: center;
    height: 38px;
    gap: 0.55rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0 0.95rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.weather-time-widget:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-glow);
    transform: translateY(-1px);
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
    flex-shrink: 0;
    animation: livePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.widget-datetime {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.widget-weather {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-left: 1px solid var(--border-color);
    padding-left: 0.55rem;
    color: var(--text-secondary);
}

.weather-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.weather-temp {
    font-weight: 600;
    color: var(--accent-cyan);
}

@media (max-width: 768px) {
    .weather-time-widget {
        height: 34px;
        padding: 0 0.65rem;
        font-size: 0.72rem;
        gap: 0.35rem;
    }
    .widget-weather {
        padding-left: 0.35rem;
    }
}

@media (max-width: 480px) {
    .widget-datetime {
        display: none;
    }
    .widget-weather {
        border-left: none;
        padding-left: 0;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
}

/* Layout Wrapper */
.main-wrapper {
    margin-top: 100px;
    padding-bottom: 5rem;
    min-height: calc(100vh - 100px - 250px);
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .layout-grid {
        grid-template-columns: 8fr 4fr;
    }
}

/* Search Bar & Global Controls */
.search-wrapper {
    position: relative;
    width: 290px;
    transition: width 0.25s ease;
}

@media (min-width: 1200px) {
    .search-wrapper {
        width: 320px;
    }
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input {
    width: 100%;
    height: 38px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0 4.8rem 0 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    outline: none;
    display: flex;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    border-color: var(--accent-cyan);
    background-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15), 0 0 14px var(--accent-glow);
}

.search-kbd {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    pointer-events: none;
    line-height: 1;
    transition: var(--transition);
}

.search-wrapper:focus-within .search-kbd {
    opacity: 0.4;
}

.search-clear-btn {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-clear-btn:hover {
    color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.1);
}

.search-submit-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-submit-btn:hover,
.search-wrapper:focus-within .search-submit-btn {
    color: var(--accent-cyan);
}

/* ── Highlighted Search Terms ────────────────────────────────────────────── */
mark.search-highlight {
    background: rgba(0, 212, 255, 0.22);
    color: var(--accent-cyan, #00d4ff);
    font-weight: 600;
    padding: 0.08em 0.28em;
    border-radius: 3px;
    border-bottom: 1.5px solid var(--accent-cyan, #00d4ff);
}

/* Real-time Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 380px;
    max-width: 90vw;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(16px);
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.suggestion-item:last-of-type {
    border-bottom: 1px solid var(--border-color);
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: var(--bg-tertiary);
    text-decoration: none;
}

.suggestion-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    line-height: 1.3;
}

.suggestion-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    line-height: 1.2;
}

.suggestion-category {
    color: var(--text-secondary);
    font-weight: 500;
}

.suggestion-date {
    color: var(--text-muted);
}

.suggestion-arrow {
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.suggestion-item:hover .suggestion-arrow,
.suggestion-item.selected .suggestion-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent-cyan);
}

.suggestion-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    background: var(--bg-tertiary);
    color: var(--accent-cyan);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.suggestion-footer:hover {
    background: rgba(0, 212, 255, 0.12);
    text-decoration: none;
}

.suggestion-enter-badge {
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.suggestion-empty {
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
}

.suggestion-empty-text span {
    display: block;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.suggestion-empty-text small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════════════════ */
/* DEDICATED SEARCH RESULTS PAGE STYLING                                     */
/* ══════════════════════════════════════════════════════════════════════════ */

.search-page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem 1.5rem;
}

/* ── Hero & Main Search Bar ── */
.search-hero {
    margin-bottom: 2rem;
    background: radial-gradient(circle at top left, rgba(0, 212, 255, 0.08), transparent 70%), var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.search-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.search-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.search-breadcrumb a:hover {
    color: var(--accent-cyan);
}

.bc-sep {
    color: var(--border-color);
}

.bc-current {
    color: var(--accent-cyan);
    font-weight: 600;
}

.search-hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-title-icon {
    font-size: 1.8rem;
}

.search-hero-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    max-width: 650px;
    line-height: 1.5;
}

.search-main-form {
    width: 100%;
    margin-bottom: 1.25rem;
}

.search-main-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-main-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-cyan);
    pointer-events: none;
}

.search-main-input {
    width: 100%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.1rem 140px 1.1rem 3.4rem;
    font-size: 1.05rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-main-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.2), 0 0 20px rgba(0, 212, 255, 0.2);
}

.search-main-clear {
    position: absolute;
    right: 120px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 50%;
    transition: var(--transition);
}

.search-main-clear:hover {
    color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.1);
}

.search-main-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--accent-cyan, #00d4ff), #3b82f6);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.search-main-btn:hover {
    transform: translateY(-50%) scale(1.03);
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.45);
}

/* Quick Topic Pills */
.search-quick-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.82rem;
}

.quick-tags-label {
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 4px;
}

.quick-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-tag-chip {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 12px;
    text-decoration: none;
    font-family: var(--font-mono, monospace);
    font-size: 0.78rem;
    transition: var(--transition);
}

.quick-tag-chip:hover,
.quick-tag-chip.active {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    text-decoration: none;
}

/* ── Toolbar: Tabs & Sort ── */
.search-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-type-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.search-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.search-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    border-color: var(--border-color-hover, #4b5563);
}

.search-tab.active {
    background: var(--accent-cyan, #00d4ff);
    color: #0b1120;
    border-color: var(--accent-cyan);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.25);
}

.tab-badge {
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.search-tab.active .tab-badge {
    background: rgba(0, 0, 0, 0.25);
    color: #000;
}

.search-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-sort-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.search-sort-buttons {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px;
}

.sort-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
}

.sort-btn:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.sort-btn.active {
    background: var(--bg-tertiary);
    color: var(--accent-cyan);
    font-weight: 700;
}

/* ── Stats Summary Bar ── */
.search-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.query-highlight {
    color: var(--accent-cyan);
    font-weight: 700;
}

.tab-specifier {
    color: var(--text-muted);
    margin-left: 4px;
}

.stats-pages {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono, monospace);
}

/* ── Result Cards ── */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.search-result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-result-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25), 0 0 15px rgba(0, 212, 255, 0.1);
}

.card-accent {
    width: 4px;
    background: var(--accent-bar-color, #6366f1);
    flex-shrink: 0;
}

.card-content-wrap {
    flex: 1;
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.result-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.result-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--badge-color, var(--accent-cyan));
    letter-spacing: 0.02em;
}

.type-sub-cat {
    color: var(--text-muted);
    font-weight: 500;
}

.result-card-stats {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.result-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.result-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.result-card-title a:hover {
    color: var(--accent-cyan);
    text-decoration: none;
}

.result-card-snippet {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.result-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.result-card-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.author-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-right: 6px;
}

.author-avatar-xs {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}

.result-tag-pill {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-family: var(--font-mono, monospace);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: var(--transition);
}

.result-tag-pill:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    text-decoration: none;
}

.result-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.result-action-btn:hover {
    gap: 10px;
    text-decoration: underline;
}

/* ── Pagination ── */
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.5rem 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.page-btn:hover:not(.disabled):not(.current) {
    background: var(--bg-tertiary);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    text-decoration: none;
}

.page-btn.current {
    background: var(--accent-cyan);
    color: #0b1120;
    font-weight: 700;
    border-color: var(--accent-cyan);
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 4px;
}

/* ── Empty State ── */
.search-empty-state {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3.5rem 2rem;
    text-align: center;
    margin-top: 1rem;
}

.empty-icon-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem auto;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon {
    font-size: 2.2rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 550px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

.search-tips-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.tips-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.tips-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

.tips-list code {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-cyan);
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
}

.empty-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
    text-align: left;
}

.category-explore-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-explore-card:hover {
    border-color: var(--cat-colour, var(--accent-cyan));
    transform: translateY(-2px);
    background: var(--bg-tertiary);
    text-decoration: none;
}

.cat-card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cat-card-body {
    flex: 1;
    min-width: 0;
}

.cat-card-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
}

.cat-card-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.recommended-section {
    margin-top: 2rem;
    text-align: left;
}

.section-heading {
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.section-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.rec-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rec-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
}

.rec-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
}

.rec-views {
    color: var(--text-muted);
}

.rec-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.rec-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.rec-title a:hover {
    color: var(--accent-cyan);
}

.rec-excerpt {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.rec-link {
    color: var(--accent-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    margin-top: 0.25rem;
}

.rec-link:hover {
    text-decoration: underline;
}

/* ── Responsive Search Adjustments ── */
@media (max-width: 768px) {
    .search-wrapper {
        width: 100%;
    }

    .search-suggestions {
        width: 100%;
    }

    .search-hero {
        padding: 1.5rem 1rem;
    }

    .search-hero-title {
        font-size: 1.5rem;
    }

    .search-main-input {
        padding-right: 100px;
        font-size: 0.95rem;
    }

    .search-main-btn span {
        display: none;
    }

    .search-main-btn {
        padding: 0.65rem;
    }

    .search-main-clear {
        right: 50px;
    }

    .search-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-type-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        flex-wrap: nowrap;
    }

    .card-content-wrap {
        padding: 1.25rem 1rem;
    }

    .result-card-title {
        font-size: 1.1rem;
    }
}

/* ── Featured card — IDE file-explorer header style ── */
.featured-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    margin-bottom: 3rem;
    position: relative;
}
.featured-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--accent-gradient);
}
.featured-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0,212,255,.08);
}

@media (min-width: 768px) {
    .featured-card {
        grid-template-columns: 1fr 1.1fr;
    }
}

.featured-img-container {
    min-height: 250px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.featured-img-placeholder {
    font-size: 5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.65;
}

.featured-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge {
    align-self: flex-start;
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 212, 255, 0.2);
    margin-bottom: 1rem;
}
.badge.cloud {
    background: rgba(63, 185, 80, 0.08);
    color: var(--accent-emerald);
    border-color: rgba(63, 185, 80, 0.2);
}
.badge.backend {
    background: rgba(168, 85, 247, 0.08);
    color: var(--accent-violet);
    border-color: rgba(168, 85, 247, 0.2);
}

.featured-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.featured-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.author-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.author-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Post Cards Grid */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 600px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
}
/* left-edge accent line on hover */
.post-card::after {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 3px; height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 3px 0 0 3px;
}
.post-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 28px rgba(0,212,255,.07);
}
.post-card:hover::after { opacity: 1; }

.post-card-img {
    height: 160px;
    background: linear-gradient(135deg, #0d1117 0%, #1c2333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
/* faint grid lines inside card image area */
.post-card-img::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,212,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.post-card-icon {
    font-size: 3.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.5;
}

.post-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.post-card-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

/* Sidebar Widgets */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-tertiary);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-blue);
}

/* Category List widget */
.category-list {
    list-style: none;
}

.category-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.category-item:last-child {
    border-bottom: none;
}

.category-item a {
    color: var(--text-secondary);
}

.category-item a:hover {
    color: var(--accent-blue);
    padding-left: 4px;
}

.category-count {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Tag Cloud widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.tag-item:hover {
    background: var(--accent-gradient);
    color: #ffffff;
    border-color: transparent;
}

/* Newsletter Widget */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.form-input {
    width: 100%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--accent-blue);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.01em;
}
.btn-primary:hover {
    box-shadow: 0 0 18px var(--accent-glow), 0 0 32px var(--accent-glow-v);
    transform: translateY(-1px);
    opacity: 0.93;
}

/* Blog Post Detail View */
.post-detail-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.25rem;
    margin: 1rem 0;
    line-height: 1.2;
}

.post-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.post-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.post-body a {
    text-decoration: underline;
    font-weight: 500;
}

/* Rendered Markdown Styling */
.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2 {
    font-size: 1.6rem;
    margin: 2.5rem 0 1.25rem;
}

.post-body h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body blockquote {
    border-left: 4px solid var(--accent-blue);
    background: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}

.post-body blockquote p {
    margin-bottom: 0;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.post-body th,
.post-body td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.post-body th {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
}

.post-body tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Inline code and Code block formatting */
.post-body code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background-color: var(--bg-tertiary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    color: #e2e8f0;
}

.post-body pre {
    background-color: #0d1117 !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    padding: 1.25rem;
    overflow-x: auto;
    position: relative;
}

.post-body pre code {
    background-color: transparent;
    padding: 0;
    font-size: 0.9rem;
    color: inherit;
    display: block;
}

/* Copy Button for code blocks */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #161b22;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 0.5rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

.code-header+pre {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.copy-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: var(--transition);
}

.copy-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

/* Post Detail Tags widget */
.post-tags-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ── Footer — terminal status-bar accent ── */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    /* thin cyan top stripe */
    box-shadow: inset 0 1px 0 0 rgba(0,212,255,.1);
    padding: 4rem 0 2rem;
    margin-top: auto;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 0.9rem;
    max-width: 320px;
}

.footer-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-blue);
    padding-left: 4px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

/* Admin Dashboard CSS */
.admin-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.admin-table th {
    font-weight: 600;
    color: var(--text-primary);
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.flash-messages {
    list-style: none;
    margin-bottom: 1.5rem;
}

.flash-message {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.flash-message.success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.flash-message.error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.flash-message.info {
    background-color: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ── Page header — IDE command-palette style ── */
.page-header {
    background: linear-gradient(135deg,
        rgba(0,212,255,.04) 0%,
        rgba(168,85,247,.04) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-gradient);
}
.page-header h1 {
    font-family: var(--font-mono);
    font-size: clamp(1.6rem,3vw,2.2rem);
    margin-bottom: 0.5rem;
}
.page-header p { color: var(--text-secondary); }

/* Responsive Mobile Navigation Overlay */
@media (max-width: 991px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        align-items: flex-start;
        padding: 3rem 2rem;
        gap: 2rem;
        transition: var(--transition);
        border-top: 1px solid var(--border-color);
        z-index: 99;
    }

    .nav-links.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .search-wrapper {
        width: 100%;
    }

    .nav-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-tools-group {
        margin-left: auto;
        gap: 0.6rem;
    }
}

/*The button of update and delete in post detail to display in the same line*/
.post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.5rem 0;
}

.delete-form {
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3694cd;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-danger {
    background: #dc2626;
    font-size: 14px;
    color: white;
    padding-top: 18px;
    padding-bottom: 18px;
}

.btn-danger:hover {
    background: #b91c1c;
    color: #000000;
}
/* with proper spacing and responsive behavior. On mobile, you can add: */
@media (max-width: 576px) {
    .post-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .post-actions .btn,
    .post-actions button {
        width: 100%;
    }
}

.center {
  text-align: center;
}


/* Pagination*/
.pagination {
    display: inline-block;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 0 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* ── Post card engagement micro-stats ───────────────────── */
.card-engagement {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.card-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.card-stat svg { flex-shrink: 0; }

/* ── Brand Hero (home page) – IDE terminal title-bar ── */
.brand-hero {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2.25rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
}
.brand-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px 0 0 3px;
}
.brand-hero::after {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(0,212,255,.06) 0%, transparent 70%);
    pointer-events: none;
}

.brand-hero-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.brand-hero-icon img {
    border-radius: 12px;
    object-fit: cover;
    width: 58px; height: 58px;
    box-shadow: 0 0 0 1px var(--border-color), 0 4px 18px rgba(0,212,255,.2);
    transition: transform 0.3s ease, box-shadow 0.3s;
}
.brand-hero-icon img:hover {
    transform: scale(1.07) rotate(-2deg);
    box-shadow: 0 0 0 1px rgba(0,212,255,.3), 0 8px 28px rgba(0,212,255,.35);
}

.brand-hero-name {
    font-family: var(--font-mono);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.2rem;
    line-height: 1.1;
}
.brand-hero-accent {
    font-weight: 400;
    -webkit-text-fill-color: transparent;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-hero-tagline {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin: 0;
    position: relative;
    display: inline-block;
    letter-spacing: 0.02em;
}
.brand-hero-tagline::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 1px;
    background: var(--accent-gradient);
    transition: width 0.5s ease;
}
.brand-hero:hover .brand-hero-tagline::after { width: 100%; }

.brand-hero-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.brand-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    min-width: 52px;
}
.brand-stat-value {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.brand-stat-label {
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.brand-stat-divider {
    width: 1px; height: 32px;
    background: var(--border-color);
}
@media (max-width: 600px) {
    .brand-hero { flex-direction: column; align-items: flex-start; padding: 1.25rem; }
    .brand-hero-stats { align-self: stretch; justify-content: space-around; }
}

/* ── Utility ── */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}
.btn-outline:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0,212,255,.05);
}

/* ── 🍪 Cookie Consent & Session Preferences Banner ── */
.cookie-consent-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: calc(100% - 2.5rem);
    max-width: 960px;
    z-index: 1050;
    background: var(--card-bg, rgba(18, 24, 38, 0.94));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4), 0 0 24px var(--accent-glow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    opacity: 0;
    pointer-events: none;
}

.cookie-consent-banner.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner-container {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-banner-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.cookie-banner-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 0 12px var(--accent-glow);
}

.cookie-banner-text {
    flex: 1;
    min-width: 0;
}

.cookie-banner-heading-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
}

.cookie-banner-title {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.cookie-banner-tag {
    font-size: 0.65rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 212, 255, 0.25);
}

.cookie-banner-desc {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: 0;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.btn-cookie-accept {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 212, 255, 0.3);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn-cookie-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.45);
}

.btn-cookie-essential {
    display: inline-flex;
    align-items: center;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-cookie-essential:hover {
    border-color: var(--text-secondary);
    background: var(--bg-secondary);
}

.btn-cookie-details {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    text-decoration: underline;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.btn-cookie-details:hover {
    color: var(--text-primary);
}

/* Detailed Cookie Category Panel */
.cookie-details-panel {
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem;
}

.cookie-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.cookie-detail-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
}

.cookie-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.cookie-detail-title {
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.cookie-detail-card p {
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin: 0;
}

.cookie-badge {
    font-size: 0.62rem;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 1px 5px;
    border-radius: 4px;
}

.badge-required {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-active {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge-session {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-violet);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.footer-cookie-link {
    cursor: pointer;
}

@media (max-width: 860px) {
    .cookie-banner-main {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-banner-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}