* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Purple/Violet Gaming Theme */
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;

    /* Accent Colors */
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-green: #10b981;
    --accent-yellow: #fbbf24;

    /* Background Colors */
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --bg-input: #12121f;

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders & Effects */
    --border-color: #2d2d4a;
    --glow-primary: rgba(139, 92, 246, 0.5);
    --glow-cyan: rgba(6, 182, 212, 0.5);
    --glow-pink: rgba(236, 72, 153, 0.5);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 100%);
    --gradient-card: linear-gradient(145deg, var(--bg-card) 0%, #16162a 100%);
}

/* ==========================================
   Base Styles
   ========================================== */

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
}

.float-icon {
    position: absolute;
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.1;
    animation: floatIcon 20s linear infinite;
}

.float-icon:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 25s; }
.float-icon:nth-child(2) { left: 20%; animation-delay: -5s; animation-duration: 20s; }
.float-icon:nth-child(3) { left: 35%; animation-delay: -10s; animation-duration: 28s; }
.float-icon:nth-child(4) { left: 50%; animation-delay: -7s; animation-duration: 22s; }
.float-icon:nth-child(5) { left: 65%; animation-delay: -3s; animation-duration: 24s; }
.float-icon:nth-child(6) { left: 75%; animation-delay: -12s; animation-duration: 26s; }
.float-icon:nth-child(7) { left: 85%; animation-delay: -8s; animation-duration: 21s; }
.float-icon:nth-child(8) { left: 92%; animation-delay: -15s; animation-duration: 23s; }

@keyframes floatIcon {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.1; }
    90% { opacity: 0.1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* ==========================================
   Navigation
   ========================================== */

.main-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    font-size: 1.8rem;
}

.brand-text {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

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

.nav-link i {
    font-size: 0.85rem;
}

.nav-btn-style {
    font-family: inherit;
}

.nav-right {
    display: flex;
    align-items: center;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.theme-toggle input {
    display: none;
}

.toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

.theme-toggle input:checked + .toggle-track .toggle-thumb {
    left: 22px;
    background: white;
}

.toggle-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 40px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 400px;
}

.hero-content {
    flex: 1;
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gradient-primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.title-icon {
    font-size: 3rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.hero-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Decoration */
.hero-decoration {
    position: relative;
    width: 300px;
    height: 300px;
}

.console-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.console-item {
    position: absolute;
    border-radius: 12px;
    animation: consoleFloat 6s ease-in-out infinite;
}

.console-item.c1 {
    width: 200px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.4);
}

.console-item.c2 {
    width: 160px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0891b2 100%);
    top: 40%;
    left: 30%;
    animation-delay: -2s;
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.4);
}

.console-item.c3 {
    width: 180px;
    height: 110px;
    background: linear-gradient(135deg, var(--accent-pink) 0%, #db2777 100%);
    top: 55%;
    left: 15%;
    animation-delay: -4s;
    box-shadow: 0 20px 60px rgba(236, 72, 153, 0.4);
}

@keyframes consoleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

/* ==========================================
   Main Content
   ========================================== */

.main-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px 60px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ==========================================
   Section Styles
   ========================================== */

.section {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px;
    transition: all 0.3s ease;
}

.section:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.1);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.section-title-group h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
}

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

/* ==========================================
   Buttons
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--glow-primary);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-block {
    width: 100%;
    margin-top: 20px;
}

/* ==========================================
   Tab Buttons
   ========================================== */

.tutorial-tabs,
.viz-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn,
.viz-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tab-btn:hover,
.viz-tab-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.tab-btn.active,
.viz-tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px var(--glow-primary);
}

/* ==========================================
   Tutorial Content
   ========================================== */

.tutorial-content {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 25px;
}

.lesson {
    display: none;
}

.lesson.active {
    display: block;
}

.lesson h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: var(--primary-light);
    margin-bottom: 15px;
}

.lesson > p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Code Example */
.code-example {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

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

.code-example code {
    display: block;
    padding: 15px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--accent-green);
}

/* Challenge Box */
.challenge-box {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.challenge-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(236, 72, 153, 0.2);
    color: var(--accent-pink);
    font-weight: 600;
    font-size: 0.9rem;
}

.challenge-box > p {
    padding: 15px;
    color: var(--text-secondary);
}

/* ==========================================
   SQL Editor
   ========================================== */

.editor-container {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 20px;
}

.editor-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.editor-wrapper {
    display: flex;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.editor-line-numbers {
    padding: 15px 10px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: right;
    user-select: none;
    border-right: 1px solid var(--border-color);
    min-width: 40px;
}

#sqlEditor {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 150px;
    outline: none;
}

#sqlEditor::placeholder {
    color: var(--text-muted);
}

/* Results */
.result-container {
    display: none;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
}

.result-container.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.result-count {
    color: var(--accent-green);
    font-weight: 600;
}

#resultTable {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    padding: 12px 15px;
    background: var(--bg-card);
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-light);
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

table tr:hover {
    background: var(--bg-card-hover);
}

/* Error Message */
.error-message {
    display: none;
    padding: 15px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #f87171;
    margin-top: 15px;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ==========================================
   Chart Container
   ========================================== */

.chart-container {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 30px;
    min-height: 400px;
}

.favorites-stats {
    display: none;
    margin-top: 20px;
}

.favorites-stats.show {
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

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

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-picks {
    margin-top: 20px;
}

.top-picks h4 {
    color: var(--accent-pink);
    margin-bottom: 15px;
}

.top-pick-item {
    background: var(--bg-card);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

.top-pick-item .name {
    font-weight: 600;
}

.top-pick-item .count {
    background: var(--gradient-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.no-favorites-chart {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-favorites-chart i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* ==========================================
   Schema Cards
   ========================================== */

.schema-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.schema-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.schema-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.schema-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.schema-card-header i {
    color: var(--primary);
    font-size: 1.1rem;
}

.schema-card-header h3 {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 1rem;
    color: var(--accent-cyan);
}

.schema-fields {
    list-style: none;
    padding: 15px 20px;
}

.schema-fields li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
}

.schema-fields li:last-child {
    border-bottom: none;
}

.field-key {
    color: var(--accent-yellow);
    font-weight: 600;
}

.field-name {
    color: var(--text-primary);
}

.field-type {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ==========================================
   History Section
   ========================================== */

.history-content {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 25px;
}

.history-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.history-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

.history-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.history-item h3 {
    color: var(--primary-light);
    margin-bottom: 10px;
}

/* ==========================================
   Achievements
   ========================================== */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.achievement-badge {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.achievement-badge:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.achievement-badge.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.achievement-badge.unlocked {
    border-color: var(--accent-green);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.achievement-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.achievement-date {
    font-size: 0.7rem;
    color: var(--accent-green);
    margin-top: 8px;
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: -150px;
    right: 20px;
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-orange) 100%);
    color: var(--bg-dark);
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(251, 191, 36, 0.4);
    z-index: 2000;
    transition: top 0.5s ease;
    min-width: 280px;
}

.achievement-notification.show {
    top: 80px;
    animation: notificationBounce 0.5s ease;
}

@keyframes notificationBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.achievement-notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-notification-content i {
    font-size: 2rem;
}

.achievement-notification-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.achievement-notification-text strong {
    font-size: 0.9rem;
}

/* Achievements Modal */
.achievements-modal-content {
    max-width: 800px;
}

#allAchievementsList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.achievement-badge-large {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.achievement-badge-large.unlocked {
    border-color: var(--accent-green);
}

.achievement-badge-large.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-badge-large .achievement-icon {
    font-size: 3rem;
}

/* ==========================================
   Favorites Section
   ========================================== */

.favorites-form-card,
.favorites-list-card {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-light);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.favorites-list-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-pink);
    margin-bottom: 20px;
}

.no-favorites {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.favorite-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.favorite-item:hover {
    border-color: var(--primary);
}

.favorite-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.favorite-item-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.favorite-item-info strong {
    color: var(--primary-light);
    min-width: 100px;
}

.favorite-item-memory {
    background: var(--bg-input);
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 3px solid var(--accent-pink);
    color: var(--text-secondary);
    font-style: italic;
}

.delete-favorite {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.delete-favorite:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.favorite-timestamp {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ==========================================
   Modal
   ========================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f87171;
    color: white;
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.7;
}

.modal-body h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-light);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.modal-body ul,
.modal-body ol {
    margin-left: 25px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.modal-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.modal-footer-text {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--primary-light);
    font-style: italic;
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    position: relative;
    z-index: 1;
    padding: 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-divider {
    color: var(--border-color);
}

/* ==========================================
   Animations
   ========================================== */

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

/* ==========================================
   Classic Mode (Retro Off)
   ========================================== */

body.classic-mode .animated-bg::before {
    opacity: 0.3;
}

body.classic-mode .float-icon {
    display: none;
}

body.classic-mode .console-item {
    animation: none;
}

body.classic-mode .section:hover {
    box-shadow: none;
}

body.classic-mode .btn-primary {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

body.classic-mode .achievement-badge.unlocked {
    box-shadow: none;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
        justify-content: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-decoration {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .main-content {
        padding: 20px;
    }

    .section {
        padding: 25px 20px;
    }

    .section-header {
        flex-direction: column;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .editor-toolbar {
        flex-wrap: wrap;
    }

    .schema-grid {
        grid-template-columns: 1fr;
    }

    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .section-title-group h2 {
        font-size: 1.3rem;
    }

    .tab-btn,
    .viz-tab-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .tab-btn i,
    .viz-tab-btn i {
        display: none;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--bg-card-hover);
    border-radius: 5px;
}

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