/* Japanese Verb Conjugation SRS - Premium Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Obsidian Indigo Color Palette */
    --bg-darkest: hsl(228, 20%, 6%);
    --bg-darker: hsl(228, 16%, 10%);
    --bg-card: hsla(228, 14%, 15%, 0.65);
    --bg-card-hover: hsla(228, 14%, 20%, 0.8);
    --border-color: hsla(228, 12%, 25%, 0.4);
    --border-glow: hsla(179, 93%, 44%, 0.15);
    
    /* Neon Accents */
    --accent-primary: hsl(270, 45%, 60%); /* Royal Amethyst Lavender */
    --accent-secondary: hsl(190, 60%, 48%); /* Muted Cyan */
    --accent-purple: hsl(320, 40%, 52%); /* Deep Plum */
    --accent-success: hsl(145, 80%, 45%); /* Neon Green */
    --accent-warning: hsl(35, 95%, 55%); /* Bright Amber */
    
    /* Text Colors */
    --text-primary: hsl(0, 0%, 96%);
    --text-secondary: hsl(228, 12%, 70%);
    --text-muted: hsl(228, 10%, 50%);
    --text-glow: hsla(179, 93%, 44%, 0.4);
    
    /* Font stacks */
    --font-ui: 'Inter', sans-serif;
    --font-ja: 'Noto Sans JP', sans-serif;
    --font-num: 'Outfit', sans-serif;

    /* Transitions & Shadows */
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-card: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px hsla(179, 93%, 44%, 0.2);
}

/* Light Mode overrides */
body.light-theme {
    --bg-darkest: hsl(220, 20%, 95%);
    --bg-darker: hsl(220, 20%, 98%);
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --border-color: rgba(200, 200, 200, 0.5);
    --border-glow: hsla(270, 45%, 60%, 0.1);
    
    --accent-primary: hsl(270, 40%, 50%);
    --accent-secondary: hsl(190, 55%, 40%);
    --accent-purple: hsl(320, 35%, 45%);
    
    --text-primary: hsl(228, 20%, 15%);
    --text-secondary: hsl(228, 12%, 35%);
    --text-muted: hsl(228, 8%, 55%);
    --text-glow: rgba(0, 0, 0, 0.1);
    --shadow-premium: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-darkest);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    transition: background-color 0.5s ease;
}

/* Background mesh blur effect */
.bg-glow-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.bg-glow-mesh::before, .bg-glow-mesh::after {
    content: '';
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    mix-blend-mode: screen;
    animation: rotateMesh 20s infinite alternate;
}
.bg-glow-mesh::before {
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 80%);
    top: -10%;
    left: -10%;
}
.bg-glow-mesh::after {
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 80%);
    bottom: -10%;
    right: -10%;
    animation-delay: -10s;
}

body.light-theme .bg-glow-mesh::before, body.light-theme .bg-glow-mesh::after {
    opacity: 0.08;
    mix-blend-mode: multiply;
}

@keyframes rotateMesh {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(10%, 10%) rotate(360deg); }
}

/* Layout Framework */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Navigation Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-darker);
    border-right: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-smooth);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(161, 107, 199, 0.4);
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transform: scale(1.38); /* Zooms in to hide outer corners */
    transition: var(--transition-smooth);
}

/* Default Theme: Dark Mode */
.brand-icon .logo-light {
    display: none;
}
.brand-icon .logo-dark {
    display: block;
}

/* Light Theme overrides */
body.light-theme .brand-icon .logo-light {
    display: block;
}
body.light-theme .brand-icon .logo-dark {
    display: none;
}

body.light-theme .brand-icon img {
    filter: contrast(1.05) brightness(0.98); /* Slight adjustment for light mode visibility */
}



.brand-name {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-num);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-item a i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.nav-item a:hover {
    color: var(--text-primary);
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

.nav-item.active a {
    color: var(--text-primary);
    background: linear-gradient(90deg, var(--bg-card) 0%, rgba(49, 172, 196, 0.05) 100%);
    border-color: rgba(49, 172, 196, 0.3);
    box-shadow: inset 3px 0 0 var(--accent-secondary);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* User mini profile or streak widget in sidebar */
.streak-widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.streak-fire {
    font-size: 1.5rem;
    color: var(--accent-primary);
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(255,46,99,0.3)); }
    100% { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(255,46,99,0.7)); }
}

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

.streak-count {
    font-family: var(--font-num);
    font-size: 1.1rem;
    font-weight: 700;
}

.streak-lbl {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Theme Toggle button */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}
.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-secondary);
    background-color: var(--bg-card);
}

/* Main Content Wrapper */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 2.5rem 3rem;
    min-height: 100vh;
    position: relative;
    max-width: 1400px;
    width: calc(100% - 260px);
}

/* Views Routing Container */
.view-panel {
    display: none;
    animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.view-panel.active {
    display: block;
    opacity: 1;
}

.view-panel.active.switching {
    opacity: 0;
    transform: translateY(5px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Common Header Styles */
.view-header {
    margin-bottom: 2rem;
}

.view-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.view-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   DASHBOARD VIEW
   ========================================================================== */

/* Stats Grid on Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}
.stat-card:hover {
    border-color: rgba(49, 172, 196, 0.25);
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
}

.stat-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-val {
    font-family: var(--font-num);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

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

/* Card Count breakdown bar */
.card-breakdown {
    height: 6px;
    display: flex;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1rem;
    background-color: hsla(228, 12%, 25%, 0.2);
}

.breakdown-seg {
    height: 100%;
    transition: width 0.5s ease;
}
.breakdown-seg.new { background-color: var(--text-muted); }
.breakdown-seg.learning { background-color: var(--accent-purple); }
.breakdown-seg.review { background-color: var(--accent-secondary); }
.breakdown-seg.mastered { background-color: var(--accent-success); }

/* Study Container Stage */
.study-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    width: 100%;
}

/* The Flashcard itself */
.flashcard-outer {
    perspective: 1200px;
    width: 100%;
    max-width: 600px;
    height: 380px;
    margin-bottom: 2rem;
    cursor: pointer;
}

.flashcard-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: var(--transition-card);
}

.flashcard-outer.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(20px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-front {
    background-image: radial-gradient(circle at top right, rgba(161, 107, 199, 0.05) 0%, transparent 50%);
}

.card-back {
    background-image: radial-gradient(circle at bottom left, rgba(49, 172, 196, 0.05) 0%, transparent 50%);
    transform: rotateY(180deg);
}

/* Explicit visibility management to prevent card-front and card-back bleed-through and messy text overlays */
.flashcard-outer:not(.flipped) .card-back {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.flashcard-outer.flipped .card-front {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.flashcard-outer:not(.flipped) .card-front {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.flashcard-outer.flipped .card-back {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Card Header elements */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-secondary);
    font-weight: 700;
}

.card-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}

/* Card Body elements */
.card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-align: center;
    padding: 0.5rem 0;
}

.verb-kanji {
    font-family: var(--font-ja);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.verb-romaji {
    font-family: var(--font-num);
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.verb-english {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.target-conjugation {
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-purple) 100%);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(161, 107, 199, 0.3);
}

/* Card Back specifics */
.card-back-answer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.5rem;
}

.answer-header {
    font-size: 0.85rem;
    color: var(--accent-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.answer-kanji {
    font-family: var(--font-ja);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.answer-kana {
    font-family: var(--font-ja);
    font-size: 1.35rem;
    color: var(--accent-primary);
    margin-top: -0.25rem;
}

.answer-romaji {
    font-family: var(--font-num);
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

/* TTS Pronunciation button */
.tts-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: var(--transition-smooth);
}
.tts-button:hover {
    background-color: var(--accent-secondary);
    color: var(--bg-darkest);
    border-color: var(--accent-secondary);
    transform: scale(1.1);
}

/* Mini examples block on back of card */
.card-examples {
    width: 100%;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    font-size: 0.85rem;
}

.example-item {
    margin-bottom: 0.5rem;
    text-align: left;
}
.example-item:last-child {
    margin-bottom: 0;
}

.ex-jp {
    font-family: var(--font-ja);
    color: var(--text-primary);
    font-weight: 500;
}

.ex-romaji {
    font-family: var(--font-num);
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 0.05rem 0;
    font-style: italic;
}

.ex-en {
    color: var(--accent-secondary);
    font-size: 0.75rem;
}

/* Card footer instructions */
.card-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Interactive Controls Stage */
.study-controls {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.reveal-btn {
    width: 100%;
    padding: 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--accent-secondary);
    background-color: rgba(49, 172, 196, 0.05);
    color: var(--accent-secondary);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.reveal-btn:hover {
    background-color: var(--accent-secondary);
    color: var(--bg-darkest);
    box-shadow: var(--shadow-glow);
}

.srs-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    width: 100%;
}

.srs-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.srs-btn-lbl {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.srs-btn-time {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Again (score 1) */
.srs-btn.again {
    color: var(--accent-primary);
    border-color: rgba(161, 107, 199, 0.2);
}
.srs-btn.again:hover {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(161, 107, 199, 0.3);
}

/* Hard (score 3) */
.srs-btn.hard {
    color: var(--accent-warning);
    border-color: rgba(255, 170, 0, 0.2);
}
.srs-btn.hard:hover {
    background-color: var(--accent-warning);
    color: var(--bg-darkest);
    border-color: var(--accent-warning);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.3);
}

/* Good (score 4) */
.srs-btn.good {
    color: var(--accent-secondary);
    border-color: rgba(49, 172, 196, 0.2);
}
.srs-btn.good:hover {
    background-color: var(--accent-secondary);
    color: var(--bg-darkest);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(49, 172, 196, 0.3);
}

/* Easy (score 5) */
.srs-btn.easy {
    color: var(--accent-success);
    border-color: rgba(0, 230, 115, 0.2);
}
.srs-btn.easy:hover {
    background-color: var(--accent-success);
    color: var(--bg-darkest);
    border-color: var(--accent-success);
    box-shadow: 0 0 15px rgba(0, 230, 115, 0.3);
}

/* Tooltip implementation */
.group-tooltip-trigger {
    cursor: help;
}

.tooltip-box {
    visibility: hidden;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    width: 250px;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: left;
    box-shadow: var(--shadow-premium);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.tooltip-box::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: var(--border-color) transparent transparent transparent;
}

.group-tooltip-trigger:hover .tooltip-box {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Congratulation screen */
.congrats-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-premium);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.congrats-icon {
    font-size: 4rem;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
    animation: rotateJump 1.5s ease infinite alternate;
}

@keyframes rotateJump {
    0% { transform: translateY(0) rotate(0); }
    100% { transform: translateY(-15px) rotate(15deg); }
}

.congrats-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.congrats-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.congrats-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.primary-btn {
    flex-grow: 1;
    padding: 1rem;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-purple) 100%);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(161, 107, 199, 0.3);
}
.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(161, 107, 199, 0.5);
}

.secondary-btn {
    flex-grow: 1;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.secondary-btn:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-secondary);
}


/* ==========================================================================
   DICTIONARY / VERB LIST VIEW
   ========================================================================== */

/* Search and Filter Panel */
.dictionary-toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-wrapper {
    position: relative;
    flex-grow: 1;
    min-width: 250px;
}

.search-wrapper i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}
.search-input:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: var(--shadow-glow);
}

.filter-group {
    display: flex;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.35rem;
    border-radius: 12px;
    gap: 0.25rem;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 550;
    transition: var(--transition-smooth);
}
.filter-btn:hover {
    color: var(--text-primary);
}
.filter-btn.active {
    background-color: var(--accent-secondary);
    color: var(--bg-darkest);
    font-weight: 600;
}

/* Verb Dictionary Grid */
.verbs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.verb-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}
.verb-card:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
}

.verb-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.verb-card-title {
    display: flex;
    flex-direction: column;
}

.verb-card-kanji {
    font-family: var(--font-ja);
    font-size: 1.75rem;
    font-weight: 700;
}

.verb-card-kana {
    font-family: var(--font-ja);
    font-size: 0.95rem;
    color: var(--accent-primary);
    margin-top: -0.2rem;
}

.verb-card-romaji {
    font-family: var(--font-num);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.verb-card-group-tag {
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.verb-card-group-tag.group-1 { background-color: rgba(161, 107, 199, 0.1); color: var(--accent-primary); border: 1px solid rgba(161, 107, 199, 0.2); }
.verb-card-group-tag.group-2 { background-color: rgba(49, 172, 196, 0.1); color: var(--accent-secondary); border: 1px solid rgba(49, 172, 196, 0.2); }
.verb-card-group-tag.group-3 { background-color: rgba(197, 85, 160, 0.1); color: var(--accent-purple); border: 1px solid rgba(197, 85, 160, 0.2); }

.verb-card-body {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 0.75rem;
}

.verb-card-translation {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.verb-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.unlock-overlay {
    position: relative;
}

.locked-card {
    opacity: 0.45;
    position: relative;
    cursor: not-allowed;
}
.locked-card:hover {
    transform: none;
    border-color: var(--border-color);
}
.locked-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    box-shadow: var(--shadow-premium);
}

/* Detailed Verb Conjugation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 7, 9, 0.85);
    backdrop-filter: blur(8px);
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease forwards;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}
.modal-close-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background-color: rgba(161, 107, 199, 0.05);
}

.modal-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.modal-verb-title {
    display: flex;
    flex-direction: column;
}

.modal-kanji {
    font-family: var(--font-ja);
    font-size: 3rem;
    font-weight: 700;
}

.modal-kana {
    font-family: var(--font-ja);
    font-size: 1.4rem;
    color: var(--accent-primary);
    margin-top: -0.3rem;
}

.modal-romaji-translation {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Conjugations Table inside Modal */
.conjugation-table-section {
    margin-bottom: 2rem;
}

.section-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent-secondary);
}

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

.conj-cell {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.conj-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.conj-val-jp {
    font-family: var(--font-ja);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.conj-val-kana {
    font-family: var(--font-ja);
    font-size: 0.9rem;
    color: var(--accent-primary);
}

.conj-val-romaji {
    font-family: var(--font-num);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Modal Examples section */
.modal-examples-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.modal-example-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-example-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
}

.modal-ex-jp {
    font-family: var(--font-ja);
    font-size: 1.15rem;
    color: var(--text-primary);
    font-weight: 500;
}

.modal-ex-romaji {
    font-family: var(--font-num);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.15rem 0;
}

.modal-ex-en {
    color: var(--accent-secondary);
    font-size: 0.85rem;
}


/* ==========================================================================
   ANALYTICS / STATS VIEW
   ========================================================================== */

/* Progress summary cards */
.analytics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.gauge-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Circular Progress SVG */
.circle-gauge {
    position: relative;
    width: 90px;
    height: 90px;
}

.circle-gauge svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 8;
}

.circle-bar {
    fill: none;
    stroke: var(--accent-secondary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2; /* Will be set via JS */
    transition: stroke-dashoffset 0.8s ease-out;
}

.circle-txt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-num);
    font-size: 1.25rem;
    font-weight: 700;
}

/* Box distribution bar chart */
.chart-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.bar-chart-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-chart-row {
    display: grid;
    grid-template-columns: 120px 1fr 60px;
    align-items: center;
    gap: 1.5rem;
}

.bar-label {
    font-size: 0.9rem;
    font-weight: 550;
    color: var(--text-secondary);
}

.bar-track {
    height: 14px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.bar-fill {
    height: 100%;
    border-radius: 7px;
    width: 0%; /* Set via JS */
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-fill.new { background-color: var(--text-muted); }
.bar-fill.learning { background-color: var(--accent-purple); }
.bar-fill.review { background-color: var(--accent-secondary); }
.bar-fill.mastered { background-color: var(--accent-success); }

.bar-val {
    font-family: var(--font-num);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: right;
}

/* Simulated activity heat map grid */
.heatmap-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
}

.heatmap-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 1.5rem;
}

.heatmap-day {
    width: 15px;
    height: 15px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.heatmap-day:hover::after {
    content: attr(data-date) ": " attr(data-count) " reviews";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

/* Coloring classes for heat map */
.heatmap-day.level-0 { background-color: rgba(255, 255, 255, 0.03); }
.heatmap-day.level-1 { background-color: rgba(49, 172, 196, 0.2); }
.heatmap-day.level-2 { background-color: rgba(49, 172, 196, 0.4); }
.heatmap-day.level-3 { background-color: rgba(49, 172, 196, 0.7); }
.heatmap-day.level-4 { background-color: rgba(49, 172, 196, 1); }


/* ==========================================================================
   SETTINGS VIEW
   ========================================================================== */

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

.settings-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
}

.settings-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    color: var(--accent-secondary);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Settings Select Style */
.settings-select {
    width: 100%;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.25s ease;
    cursor: pointer;
}

.settings-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(161, 107, 199, 0.3);
    background: rgba(0, 0, 0, 0.35);
}

/* Custom slider style */
.range-setting {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.range-setting-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
}

.range-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-secondary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-secondary);
    transition: var(--transition-smooth);
}
.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Custom Styled Toggle Switch */
.toggle-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-lbl {
    display: flex;
    flex-direction: column;
}

.toggle-lbl-main {
    font-size: 0.95rem;
    font-weight: 550;
}

.toggle-lbl-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

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

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

input:checked + .slider {
    background-color: rgba(49, 172, 196, 0.15);
    border-color: var(--accent-secondary);
}

input:checked + .slider::before {
    transform: translateX(22px);
    background-color: var(--accent-secondary);
    box-shadow: 0 0 8px var(--accent-secondary);
}

/* Conjugations Selection Checklist */
.conjugation-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.check-item {
    background-color: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.check-item:hover {
    background-color: var(--bg-card);
    border-color: var(--accent-secondary);
}

.check-item input {
    display: none;
}

.check-box {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: transparent;
    transition: var(--transition-smooth);
}

.check-item input:checked + .check-box {
    border-color: var(--accent-secondary);
    background-color: var(--accent-secondary);
    color: var(--bg-darkest);
}

.check-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Data control buttons in Settings */
.data-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.danger-btn {
    width: 100%;
    padding: 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--accent-primary);
    background-color: rgba(161, 107, 199, 0.05);
    color: var(--accent-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.danger-btn:hover {
    background-color: var(--accent-primary);
    color: white;
}


/* ==========================================================================
   RESPONSIVE OVERRIDES (MOBILE & TABLET DESIGN)
   ========================================================================== */

@media (max-width: 900px) {
    /* Sidebar turns into Bottom Navigation on mobile */
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 65px;
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        flex-direction: row;
        padding: 0.5rem 1rem;
        border-right: none;
        border-top: 1px solid var(--border-color);
        background-color: var(--bg-darker);
        justify-content: space-around;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    }
    
    .brand, .sidebar-footer, .streak-widget {
        display: none; /* Hide branding and footer on mobile bottom nav */
    }
    
    .nav-links {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        margin: 0;
        padding: 0;
        gap: 0;
    }
    
    .nav-item {
        flex-grow: 1;
    }
    
    .nav-item a {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.4rem 0.5rem;
        font-size: 0.65rem;
        border-radius: 8px;
        text-align: center;
    }
    
    .nav-item a i {
        font-size: 1.15rem;
    }
    
    .nav-item.active a {
        background: none;
        border: none;
        color: var(--accent-secondary);
        box-shadow: none;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: calc(1.5rem + 60px) 1.5rem 80px 1.5rem; /* bottom padding for bottom nav, top padding for top topic selector */
    }

    .sidebar-topic-selector {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: var(--bg-darker);
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 100;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    }
    
    .sidebar-topic-label {
        display: none;
    }
    
    .topic-dropdown {
        width: 240px;
        max-width: 100%;
    }
    
    .topic-dropdown-trigger {
        padding: 0.45rem 0.85rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .view-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 500px) {
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-val {
        font-size: 1.75rem;
    }
    
    .flashcard-outer {
        height: 330px;
    }
    
    .card-front, .card-back {
        padding: 1.5rem;
    }
    
    .verb-kanji {
        font-size: 2.75rem;
    }
    
    .answer-kanji {
        font-size: 2.25rem;
    }
    
    .srs-buttons {
        gap: 0.5rem;
    }
    
    .srs-btn {
        padding: 0.5rem 0.25rem;
    }
    
    .srs-btn-lbl {
        font-size: 0.8rem;
    }
    
    .srs-btn-time {
        font-size: 0.6rem;
    }
}

@media (max-width: 550px) {
    .typing-input-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .check-btn {
        width: 100%;
    }
}

/* Custom Scrollbar for premium feel */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

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

/* Study Ahead Badge Styling */
.study-ahead-badge {
    align-self: center;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #f59e0b;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.05);
    backdrop-filter: blur(10px);
}

/* ==========================================================================
   NEW IMPROVEMENTS STYLING
   ========================================================================== */

/* 1. Session Progress Tracker */
.session-progress-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.session-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.progress-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-stats {
    color: var(--accent-secondary);
    font-weight: 700;
    font-family: var(--font-num);
}

.session-progress-bar-bg {
    background: rgba(255, 255, 255, 0.04);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.session-progress-bar-fill {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    height: 100%;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    box-shadow: 0 0 8px var(--accent-secondary);
}

/* 2. Cheat Sheet Drawer & Button */
.cheat-sheet-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cheat-sheet-toggle-btn:hover {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 12px rgba(49, 172, 196, 0.15);
    transform: translateY(-2px);
}

.cheat-sheet-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 640px;
    height: 100vh;
    background: rgba(11, 12, 16, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cheat-sheet-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.drawer-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.2rem;
}

.drawer-close-btn:hover {
    color: var(--accent-primary);
}

.drawer-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.rules-section {
    margin-bottom: 2rem;
}

.rules-section h3 {
    font-size: 1rem;
    color: var(--accent-secondary);
    margin-bottom: 0.75rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.4rem;
}

.rules-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
    margin-top: 0.5rem;
}

.rules-table th, .rules-table td {
    padding: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rules-table th {
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.rules-table td {
    color: var(--text-secondary);
}

.rules-table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* 3. Keyboard Typing Mode Styles */
.typing-container {
    width: 100%;
    max-width: 640px;
    margin: 0.5rem auto 1.5rem auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.typing-input-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.typing-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    font-size: 1.25rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.typing-input::placeholder {
    font-size: 0.95rem;
    color: var(--text-muted);
    opacity: 0.85;
}

.typing-input:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 8px rgba(49, 172, 196, 0.25);
    background: rgba(0, 0, 0, 0.3);
}

.check-btn {
    padding: 1rem 2rem;
    min-width: 120px;
    font-size: 1.15rem;
    border-radius: 12px;
}

.typing-feedback {
    margin-top: 0.75rem;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.typing-feedback.correct {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10b981;
}

.typing-feedback.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.diff-correct {
    color: #10b981;
    font-weight: 600;
}

.diff-missing {
    color: #ef4444;
    text-decoration: line-through;
    font-weight: 600;
}

.diff-extra {
    color: #ef4444;
    font-weight: 600;
}

/* Segmented Deck Selector */
.deck-selector-segmented {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.3rem;
    border-radius: 12px;
    gap: 0.25rem;
    align-items: center;
}

.deck-seg-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 550;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deck-seg-btn:hover {
    color: var(--text-primary);
}

.deck-seg-btn.active {
    background-color: var(--accent-secondary);
    color: var(--bg-darkest);
    font-weight: 600;
    box-shadow: 0 0 10px rgba(49, 172, 196, 0.3);
}

/* Sidebar Topic Selector */
.sidebar-topic-selector,
.sidebar-jlpt-selector {
    width: 100%;
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-topic-label,
.sidebar-jlpt-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Topic Dropdown Styles */
.topic-dropdown {
    position: relative;
    width: 100%;
}

.topic-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.topic-dropdown-trigger-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.topic-dropdown-trigger-content i {
    font-size: 1.25rem;
    color: var(--accent-secondary);
}

.caret-icon {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform 0.25s ease, color 0.25s ease;
}

.topic-dropdown.open .caret-icon {
    transform: rotate(180deg);
    color: var(--accent-primary);
}

.topic-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(161, 107, 199, 0.25);
}

.topic-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(30, 24, 40, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1) inset;
    z-index: 999;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.5rem;
}

.topic-dropdown.open .topic-dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.topic-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.topic-dropdown-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
}

.topic-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.topic-dropdown-item.active {
    background: rgba(161, 107, 199, 0.15);
    color: var(--accent-primary);
    font-weight: 600;
}

.topic-dropdown-item.active i {
    color: var(--accent-primary);
}

/* ==========================================================================
   Multi-User User Management & Classroom Styling
   ========================================================================== */

/* User Profile Widget in Sidebar */
.user-profile-widget {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.auth-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: linear-gradient(135deg, rgba(161, 107, 199, 0.1) 0%, rgba(161, 107, 199, 0.2) 100%);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.auth-trigger-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-darkest);
    box-shadow: 0 0 12px rgba(161, 107, 199, 0.4);
}

.profile-signed-in {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    font-size: 1.8rem;
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
}

.user-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.logout-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Glassmorphic Auth Modal */
.auth-modal-content {
    max-width: 440px !important;
    padding: 2.25rem !important;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.75rem;
    gap: 1.5rem;
}

.auth-tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: all 0.25s ease;
}

.auth-tab-btn:hover {
    color: var(--text-primary);
}

.auth-tab-btn.active {
    color: var(--accent-primary);
}

.auth-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeIn 0.3s ease;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.25s ease;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(161, 107, 199, 0.3);
    background: rgba(0, 0, 0, 0.35);
}

/* Custom Role Selector for Registration */
.role-selector {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.role-option {
    flex: 1;
    cursor: pointer;
}

.role-option input {
    display: none;
}

.role-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s ease;
    text-align: center;
}

.role-box i {
    font-size: 1.4rem;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.role-option input:checked + .role-box {
    border-color: var(--accent-primary);
    background: rgba(161, 107, 199, 0.1);
    color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(161, 107, 199, 0.15);
}

.role-option input:checked + .role-box i {
    color: var(--accent-primary);
}

.role-option:hover .role-box {
    background: rgba(255, 255, 255, 0.05);
}

.auth-error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    animation: shake 0.4s ease;
}

.auth-submit-btn {
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Classroom view layouts */
.classroom-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .classroom-layout-grid {
        grid-template-columns: 1fr;
    }
}

.classroom-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

.card-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.card-section-title i {
    color: var(--accent-primary);
}

.sub-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Connection Panels */
.connection-status-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.join-code-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    justify-content: space-between;
}

.join-code-value {
    font-family: monospace;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-secondary);
    letter-spacing: 1px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    align-self: flex-start;
}

.status-badge.linked {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.linked-teacher-info {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.unlink-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
    border-radius: 8px;
    align-self: flex-start;
}

/* Homework List items */
.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assignment-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.assignment-item:hover {
    border-color: rgba(161, 107, 199, 0.3);
    background: rgba(255, 255, 255, 0.02);
}

.assignment-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assignment-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

.assignment-due-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.assignment-due-tag.overdue {
    color: #ef4444;
}

.assignment-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.assignment-progress-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.assignment-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.assignment-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.assignment-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.assignment-badge {
    align-self: flex-start;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.assignment-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.assignment-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Teacher Dashboard specific styles */
.inline-form {
    display: flex;
    gap: 0.75rem;
}

.inline-form input {
    flex: 1;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
}

.inline-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.link-feedback {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.link-feedback.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.link-feedback.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Class Roster Layout */
.roster-container {
    max-height: 480px;
    overflow-y: auto;
}

.roster-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.roster-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.2s ease;
}

.roster-item:hover {
    border-color: rgba(161, 107, 199, 0.25);
    background: rgba(255, 255, 255, 0.02);
}

.roster-student-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.roster-student-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.roster-student-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.roster-student-streak {
    color: #ff6b6b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.roster-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Settings for Assignment Form */
.assignment-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.assignment-form select,
.assignment-form textarea {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    font-family: inherit;
}

.assignment-form textarea {
    resize: none;
}

.assignment-form select:focus,
.assignment-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.assignment-feedback {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-align: center;
}

.assignment-feedback.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.assignment-feedback.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Empty State Cards */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
    max-width: 480px;
    margin: 2rem auto;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
}

.empty-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1.25rem;
}

.empty-state-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.empty-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 1.5rem;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.005);
}

/* Student Analytics Modal specific */
.analytics-modal-content {
    max-width: 680px !important;
}

/* Shake Animation for Auth Errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Admin Dashboard Specific Styles */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.role-badge.student {
    background: rgba(161, 107, 199, 0.1);
    color: #c084fc;
    border: 1px solid rgba(161, 107, 199, 0.25);
}

.role-badge.teacher {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.role-badge.admin {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.admin-users-table th,
.admin-users-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 0.9rem;
}

.admin-users-table tbody tr {
    transition: background-color 0.2s ease;
}

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

.admin-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.25rem;
}

.admin-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

.admin-action-btn.delete-btn {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.admin-action-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.admin-action-btn.role-btn {
    color: #c084fc;
    border-color: rgba(161, 107, 199, 0.3);
}

.admin-action-btn.role-btn:hover {
    background: rgba(161, 107, 199, 0.1);
    border-color: var(--accent-primary);
}

.admin-action-btn.link-btn {
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.admin-action-btn.link-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* Welcome / Landing View Styles */
.landing-container {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    padding: 2rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

.landing-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: radial-gradient(circle at center, rgba(161, 107, 199, 0.08) 0%, transparent 70%);
    padding: 3rem 1.5rem;
    border-radius: 24px;
}

.landing-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    width: 100%;
}

.landing-philosophy {
    background: linear-gradient(135deg, rgba(161, 107, 199, 0.05) 0%, rgba(49, 172, 196, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.landing-philosophy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.landing-philosophy-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
}

.landing-philosophy-visual {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.philosophy-image {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.philosophy-image:hover {
    transform: scale(1.03) rotate(-0.5deg);
}

.philosophy-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 1.25rem;
}

.philosophy-badge {
    background: rgba(49, 172, 196, 0.15);
    border: 1px solid rgba(49, 172, 196, 0.3);
    color: var(--accent-secondary);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.philosophy-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.philosophy-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 700px;
}

.landing-badge {
    background: rgba(161, 107, 199, 0.15);
    border: 1px solid rgba(161, 107, 199, 0.3);
    color: var(--accent-primary);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(161, 107, 199, 0.2);
}

.landing-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.25;
    max-width: 800px;
}

.landing-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    line-height: 1.6;
}

.landing-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.landing-cta-btn {
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.landing-cta-btn.primary-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: var(--bg-darkest);
    border: none;
    box-shadow: 0 4px 20px rgba(49, 172, 196, 0.3);
}

.landing-cta-btn.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(49, 172, 196, 0.45);
}

.landing-cta-btn.secondary-btn:hover {
    transform: translateY(-2px);
    border-color: var(--text-primary);
}

.landing-section-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
}

.landing-section-split.reverse {
    grid-template-columns: 1.2fr 1fr;
}

.landing-section-split.reverse .landing-section-visual {
    order: 2;
}

.landing-section-split.reverse .landing-features-grid {
    order: 1;
}

.landing-section-visual {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.section-image {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.section-image:hover {
    transform: scale(1.03);
}

.landing-section-split .landing-features-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 30px rgba(161, 107, 199, 0.15);
}

.feature-icon {
    font-size: 2rem;
    color: var(--accent-secondary);
    background: rgba(49, 172, 196, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.landing-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.landing-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-top: 2rem;
}

.landing-section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 600px;
    margin: -0.5rem auto 1.5rem auto;
    line-height: 1.5;
}

.pain-icon {
    color: var(--accent-purple) !important;
    background: rgba(236, 72, 153, 0.1) !important;
}

.pain-card:hover {
    border-color: var(--accent-purple) !important;
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.15) !important;
}

@media (max-width: 850px) {
    .landing-philosophy-split {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .landing-philosophy-visual {
        max-width: 350px;
        margin: 0 auto;
    }
    .philosophy-content {
        align-items: center;
        text-align: center;
    }
    .landing-section-split {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .landing-section-split.reverse {
        grid-template-columns: 1fr;
    }
    .landing-section-split.reverse .landing-section-visual {
        order: 1;
    }
    .landing-section-split.reverse .landing-features-grid {
        order: 2;
    }
    .landing-section-visual {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .landing-title {
        font-size: 2.25rem;
    }
    .landing-subtitle {
        font-size: 1.05rem;
    }
    .landing-actions {
        flex-direction: column;
        width: 100%;
    }
    .landing-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-15px); }
}


