/* ===== CSS VARIABLES & RESET ===== */
:root {
    /* Refined Majapahit Museum Color Palette */
    --primary: #9E3A25;           /* Terracotta red - batu bata Majapahit */
    --primary-dark: #1F1712;      /* Dark volcanic Candi stone */
    --primary-light: #B85C42;     /* Light terracotta for hover states */
    --secondary: #D4AF37;         /* Gold - emas Majapahit */
    --secondary-light: #E6C46A;   /* Light gold for highlights */
    --secondary-dark: #B8860B;    /* Dark gold for borders */
    --accent: #C5A028;          /* Bronze/brass */
    --bronze: #8B6914;          /* Bronze accent */
    --bg-dark: #0D0A07;         /* Deep charcoal background */
    --bg-medium: #120E0A;       /* Medium dark background */
    --bg-light: #1A1510;        /* Light dark background */
    --text-light: #F5E6D3;      /* Ivory parchment text */
    --text-muted: #C9B8A0;      /* Muted text for descriptions */
    --text-dark: #0D0A07;       /* Dark text for highlight buttons */
    --danger: #E74C3C;
    --success: #2ECC71;
    --warning: #F1C40F;
    
    /* Enhanced Typography Scale */
    --font-primary: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    --font-serif: 'Cinzel', 'Playfair Display', serif;
    --font-serif-decorative: 'Cinzel Decorative', serif;
    --font-javanese: 'Noto Sans Javanese', sans-serif;
    --font-display: 'Cinzel Decorative', 'Cinzel', serif;
    
    /* Typography Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    --text-6xl: 4.5rem;
    
    /* Refined Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.6);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.8);
    --shadow-gold: 0 4px 20px rgba(212,175,55,0.4);
    --shadow-gold-lg: 0 8px 32px rgba(212,175,55,0.5);
    --shadow-card: 0 6px 24px rgba(0,0,0,0.4);
    
    /* Enhanced Gradients */
    --gradient-bg: linear-gradient(135deg, #0D0A07 0%, #120E0A 25%, #1A1510 50%, #120E0A 75%, #0D0A07 100%);
    --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #FFD700 25%, #E6C46A 50%, #FFD700 75%, #D4AF37 100%);
    --gradient-gold-shine: linear-gradient(135deg, #D4AF37 0%, #FFD700 30%, #FFF8DC 50%, #FFD700 70%, #D4AF37 100%);
    --gradient-wood: linear-gradient(135deg, #5D2906 0%, #8B4513 50%, #3D1F04 100%);
    --gradient-candi: linear-gradient(135deg, #1F1712 0%, #32261D 50%, #120E0A 100%);
    --gradient-terracotta: linear-gradient(135deg, #9E3A25 0%, #B85C42 25%, #7D2311 75%, #5C1508 100%);
    --gradient-card: linear-gradient(145deg, rgba(30,23,18,0.9) 0%, rgba(18,14,10,0.95) 50%, rgba(13,10,7,1) 100%);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

body {
    font-family: var(--font-primary);
    background: var(--gradient-bg);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Majapahit pattern overlay - Traditional Kawung Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* Kawung-inspired pattern */
        radial-gradient(circle at 25% 25%, rgba(212,175,55,0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(212,175,55,0.03) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(212,175,55,0.02) 35px, rgba(212,175,55,0.02) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(158,58,37,0.02) 35px, rgba(158,58,37,0.02) 70px);
    pointer-events: none;
    z-index: 1;
}

/* Majapahit border decoration */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 8px solid transparent;
    border-image: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 25%, var(--secondary-light) 50%, var(--secondary) 75%, var(--secondary-dark) 100%) 1;
    pointer-events: none;
    z-index: 1000;
}

@media (max-width: 768px) {
    body::after {
        border-width: 4px;
    }
}

/* ===== MAJAPAHIT CUSTOM ICON SYSTEM ===== */
.mj-icon {
    width: 1.2em;
    height: 1.2em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
    display: inline-block;
    transition: transform var(--transition-fast), fill var(--transition-fast);
}

/* Specific styling overrides for icons */
.mj-icon-heart {
    fill: var(--primary);
    stroke: var(--secondary);
    stroke-width: 1.5;
    filter: drop-shadow(0 0 4px rgba(158, 58, 37, 0.6));
}

.mj-icon-heart-empty {
    fill: rgba(0, 0, 0, 0.4);
    stroke: var(--text-muted);
    stroke-width: 1.5;
    opacity: 0.5;
}

.mj-icon-star {
    fill: var(--secondary);
    stroke: var(--secondary-dark);
    stroke-width: 1;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.7));
}

/* Ensure align-items: center for buttons with icons */
.btn-save, .btn-logout, .btn-back, .btn-primary, .tab-btn, .auth-tab, .role-btn, .btn-export, .btn-delete, .editor-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Styling for icons inside buttons, tabs, etc. to make them stand out and size perfectly */
.btn-save .mj-icon, .btn-logout .mj-icon, .btn-back .mj-icon, .btn-primary .mj-icon, 
.tab-btn .mj-icon, .auth-tab .mj-icon, .btn-export .mj-icon, .btn-delete .mj-icon, .editor-tab .mj-icon {
    width: 1.25em;
    height: 1.25em;
    stroke-width: 2.2; /* Thicker lines for smaller button icons */
    flex-shrink: 0;
}

/* ===== SCREEN MANAGEMENT ===== */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

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

.hidden {
    display: none !important;
}

/* ===== ENHANCED MAIN MENU STYLING ===== */
#mainMenu {
    justify-content: center;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(212,175,55,0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 80%, rgba(158,58,37,0.1) 0%, transparent 40%),
        linear-gradient(rgba(13, 10, 7, 0.5), rgba(13, 10, 7, 0.8)),
        url('../bg_majapahit.png');
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 2;
    overflow-y: auto;
    padding: 40px 20px;
}

/* Vignette effect for depth */
#mainMenu::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.7) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    z-index: -1;
}

.menu-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    z-index: 5;
    position: relative;
}

/* Left Panel - Logo and Title */
.menu-left-panel {
    flex: 1;
    max-width: 420px;
    text-align: left;
    display: flex;
    flex-direction: column;
    animation: slideInLeft 1s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.menu-left-panel .logo-section {
    margin-bottom: 0;
    position: relative;
}

/* Decorative frame around logo */
.menu-left-panel .logo-section::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid rgba(212,175,55,0.15);
    border-radius: 50%;
    animation: framePulse 4s ease-in-out infinite;
}

@keyframes framePulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.05); opacity: 0.6; }
}

.surya-emblem {
    width: 140px;
    height: 140px;
    margin-bottom: 28px;
    filter: drop-shadow(0 8px 20px rgba(212,175,55,0.5));
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.surya-emblem:hover {
    transform: rotate(45deg) scale(1.05);
    filter: drop-shadow(0 12px 30px rgba(212,175,55,0.7));
}

/* Enhanced typography for museum label */
.museum-label {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 6px;
    display: block;
    margin-bottom: 8px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    font-weight: 600;
}

/* Main title with enhanced gradient */
.main-title {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
    background: var(--gradient-gold-shine);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
}

/* Enhanced divider with Majapahit motifs */
.divider-line {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    position: relative;
}

.divider-line .line {
    height: 2px;
    flex: 1;
    max-width: 80px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.divider-line .diamond {
    color: var(--secondary);
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(212,175,55,0.5);
}

/* Subtitle with better styling */
.subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--text-xl);
    color: var(--secondary-light);
    opacity: 0.95;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.05em;
}

/* Right Panel - Menu Grid */
.menu-right-panel {
    flex: 1.3;
    animation: slideInRight 1s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* Enhanced Menu Cards with Majapahit aesthetics */
.menu-card {
    background: var(--gradient-card);
    border: 2px solid rgba(212, 175, 55, 0.35);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow-card), 0 0 0 rgba(212,175,55,0);
    position: relative;
    overflow: hidden;
    min-height: 170px;
    width: 100%;
}

/* Traditional pattern overlay */
.menu-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 5 L35 25 L55 30 L35 35 L30 55 L25 35 L5 30 L25 25 Z' fill='none' stroke='%23D4AF37' stroke-width='1'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Gold corner accents */
.menu-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: var(--shadow-card), 0 0 25px rgba(212, 175, 55, 0.3);
}

.menu-card:hover::after {
    opacity: 1;
    background: var(--gradient-gold);
}

.menu-card:active {
    transform: translateY(-4px) scale(0.98);
}

/* Center the Evaluasi card */
.menu-card[data-screen="evaluasi"] {
    grid-column: 2;
}

/* Enhanced Icon Wrapper */
.card-icon-wrapper {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.menu-card:hover .card-icon-wrapper {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 6px 12px rgba(212,175,55,0.4));
}

.menu-icon-svg {
    width: 100%;
    height: 100%;
}

/* Enhanced Card Label */
.card-label {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.3;
    transition: color 0.3s ease;
}

.menu-card:hover .card-label {
    color: var(--secondary-light);
}

/* Highlighted Game Card */
.menu-card.highlight {
    background: linear-gradient(145deg, rgba(120, 58, 32, 0.95) 0%, rgba(70, 31, 18, 1) 100%);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: var(--shadow-card), 0 0 15px rgba(212, 175, 55, 0.4);
    animation: goldPulseEnhanced 3s infinite ease-in-out;
}

@keyframes goldPulseEnhanced {
    0%, 100% { 
        border-color: rgba(255, 215, 0, 0.5); 
        box-shadow: var(--shadow-card), 0 0 15px rgba(212,175,55,0.3);
    }
    50% { 
        border-color: rgba(255, 215, 0, 1); 
        box-shadow: var(--shadow-card), 0 0 30px rgba(255,215,0,0.6);
    }
}

@keyframes goldPulse {
    0%, 100% { border-color: rgba(255, 215, 0, 0.6); box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 10px rgba(212,175,55,0.2); }
    50% { border-color: rgba(255, 215, 0, 1); box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 20px rgba(255,215,0,0.5); }
}

/* Bottom Filigree Flourish */
.menu-bottom-flourish {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 52px;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

.flourish-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.7));
}

@media (max-width: 900px) {
    .menu-container {
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        padding-bottom: 60px;
    }
    
    .menu-left-panel {
        text-align: center;
        align-items: center;
    }
    
    .divider-line {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 380px;
    }
    
    .menu-card[data-screen="evaluasi"] {
        grid-column: 1 / span 2;
    }
}

/* ===== ENHANCED CONTENT CONTAINERS ===== */
.content-container {
    max-width: 1000px;
    width: 100%;
    padding: 24px;
    margin: 0 auto;
}

.content-container h2 {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    margin-bottom: 32px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    letter-spacing: 0.02em;
    position: relative;
    padding-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.content-container h2 span {
    background: var(--gradient-gold-shine);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.content-container h2 .mj-icon {
    width: 1em;
    height: 1em;
    color: var(--secondary);
    filter: drop-shadow(0 2px 4px rgba(212,175,55,0.4));
    flex-shrink: 0;
}

/* Decorative underline for headings */
.content-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

/* ===== ENHANCED CARDS ===== */
.card {
    background: var(--gradient-card);
    border: 2px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(212, 175, 55, 0.03);
    backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(212, 175, 55, 0.08);
}

/* Top gold accent bar */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--gradient-gold);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Subtle pattern overlay */
.card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 0 L25 15 L40 20 L25 25 L20 40 L15 25 L0 20 L15 15 Z' fill='none' stroke='%23D4AF37' stroke-width='0.5' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.5;
}

.card h3 {
    font-family: var(--font-serif);
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: var(--text-2xl);
    border-bottom: 2px solid rgba(197, 160, 40, 0.3);
    padding-bottom: 12px;
    letter-spacing: 0.5px;
}

.card h4 {
    color: var(--secondary-light);
    margin: 24px 0 12px;
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    font-weight: 600;
}

.card p, .card li {
    line-height: 1.9;
    color: var(--text-muted);
    font-size: var(--text-base);
}

.card ul {
    margin-left: 24px;
    margin-top: 12px;
}

.card li {
    margin-bottom: 10px;
    position: relative;
}

.card li::marker {
    color: var(--secondary);
}

/* Enhanced Definition Box */
.definition {
    background: linear-gradient(135deg, rgba(158, 58, 37, 0.1) 0%, rgba(158, 58, 37, 0.05) 100%);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--secondary);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-right: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    font-style: italic;
    margin-bottom: 24px;
    color: var(--secondary-light) !important;
    font-family: var(--font-javanese);
    font-size: var(--text-lg);
    line-height: 1.8;
}

/* ===== ENHANCED TABS ===== */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    padding-bottom: 8px;
}

/* Tab container decorative line */
.tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.3), transparent);
}

.tab-btn {
    padding: 14px 28px;
    background: var(--gradient-card);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 600;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

/* Gold accent on hover/active */
.tab-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: var(--gradient-gold);
    transition: height 0.3s ease;
}

.tab-btn.active, .tab-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--secondary);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
    transform: translateY(-3px);
}

.tab-btn.active::before, .tab-btn:hover::before {
    height: 3px;
}

/* Enhanced Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

/* ===== ENHANCED EXAMPLE LISTS ===== */
.example-list {
    display: grid;
    gap: 16px;
}

.example-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.2) 100%);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--secondary);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-right: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.example-item:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.25) 100%);
    border-left-width: 6px;
    transform: translateX(4px);
}

.example-item .phrase {
    font-weight: 700;
    color: var(--secondary);
    font-size: var(--text-lg);
    margin-bottom: 8px;
    font-family: var(--font-javanese);
    letter-spacing: 0.02em;
}

.example-item .meaning {
    color: var(--text-muted);
    font-size: var(--text-base);
    line-height: 1.6;
}

/* ===== ENHANCED WRITING GUIDE ===== */
.writing-guide {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.guide-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.2) 100%);
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 175, 55, 0.15);
    transition: all 0.3s ease;
}

.guide-item:hover {
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
}

.example-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-top: 16px;
    border: 1px solid rgba(197, 160, 40, 0.2);
    line-height: 1.7;
    font-family: var(--font-javanese);
}

/* ===== ENHANCED FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    color: var(--secondary);
    font-weight: 600;
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(18, 14, 10, 0.7) 0%, rgba(30, 23, 18, 0.5) 100%);
    color: var(--text-light);
    font-size: var(--text-base);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: var(--font-primary);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.form-group input::placeholder {
    color: rgba(201, 184, 160, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary);
    background: linear-gradient(135deg, rgba(18, 14, 10, 0.9) 0%, rgba(30, 23, 18, 0.7) 100%);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

/* ===== ENHANCED BUTTONS ===== */
.btn-save, .btn-back, .btn-danger {
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: var(--text-base);
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
}

/* Shine effect for buttons */
.btn-save::before, .btn-back::before, .btn-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-save:hover::before, .btn-back:hover::before, .btn-danger:hover::before {
    left: 100%;
}

.btn-save {
    background: var(--gradient-gold-shine);
    color: var(--text-dark);
    width: 100%;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35), inset 0 2px 4px rgba(255,255,255,0.3);
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, var(--secondary-dark), var(--secondary-light)) 1;
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5), inset 0 2px 4px rgba(255,255,255,0.4);
}

.btn-back {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    margin-top: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-back:hover {
    background: var(--gradient-gold);
    color: var(--text-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold-lg);
    border-color: transparent;
}

.btn-danger {
    background: var(--gradient-terracotta);
    color: white;
    margin-top: 28px;
    box-shadow: 0 4px 20px rgba(158, 58, 37, 0.35);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(158, 58, 37, 0.5);
}

.success-msg {
    display: none;
    text-align: center;
    color: var(--success);
    margin-top: 20px;
    font-weight: 600;
    font-size: var(--text-base);
}

.success-msg.show {
    display: block;
    animation: bounceIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== GAME SCREEN ===== */
#game {
    padding: 0;
    background: #0d0907;
}

.game-ui {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 10px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2E2218 0%, #1A130E 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.player-info span:first-child {
    color: var(--secondary);
    font-weight: 700;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.level-badge {
    background: var(--gradient-gold);
    color: var(--text-dark);
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.score-display {
    color: var(--secondary);
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-serif);
}

.btn-pause {
    background: linear-gradient(135deg, rgba(82, 41, 24, 0.8) 0%, rgba(51, 23, 14, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.btn-pause:hover {
    background: var(--primary);
    border-color: var(--secondary);
    transform: scale(1.05);
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    background: #15110d;
    border-left: 6px solid #5C4A32;
    border-right: 6px solid #5C4A32;
    border-top: 6px solid #3E3020;
    border-bottom: 6px solid #2B2116;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.9);
    max-width: 100%;
    max-height: 65vh; /* Limit height so it fits on landscape mobile */
    width: auto;
    height: auto;
    aspect-ratio: 4 / 3; /* Keep aspect ratio intact */
    touch-action: none; /* Prevent browser scrolling/gestures on canvas touch */
}

.game-controls {
    display: flex;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1A130E 0%, #2E2218 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-top: none;
    border-radius: 0 0 16px 16px;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.vocab-panel {
    flex: 1;
    min-width: 250px;
}

.vocab-panel h4 {
    color: var(--secondary);
    margin-bottom: 12px;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* ===== ENHANCED VOCABULARY INVENTORY ===== */
.vocab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-height: 150px;
    overflow-y: auto;
    padding: 4px;
}

/* Custom scrollbar for vocab list */
.vocab-list::-webkit-scrollbar {
    width: 6px;
}

.vocab-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.vocab-list::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 3px;
}

.vocab-tag {
    background: linear-gradient(135deg, rgba(158, 58, 37, 0.9) 0%, rgba(125, 35, 17, 0.95) 100%);
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    border: 1px solid rgba(212, 175, 55, 0.4);
    animation: popIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 3px 10px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Gold accent on vocab tags */
.vocab-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
    opacity: 0.7;
}

.vocab-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3), inset 0 1px 2px rgba(255,255,255,0.2);
    border-color: rgba(212, 175, 55, 0.6);
}

/* Counter badge */
.vocab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold);
    color: var(--text-dark);
    font-size: var(--text-xs);
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-left: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Enhanced vocab panel */
.vocab-panel {
    flex: 1;
    min-width: 280px;
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.6) 0%, rgba(18, 14, 10, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}

.vocab-panel h4 {
    color: var(--secondary);
    margin-bottom: 12px;
    font-family: var(--font-serif);
    font-size: var(--text-base);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}



/* Empty state */
.vocab-list:empty::after {
    content: 'Belum ada kata yang terkumpul...';
    color: var(--text-muted);
    font-style: italic;
    font-size: var(--text-sm);
    opacity: 0.6;
}

.control-hint {
    text-align: right;
    color: rgba(245, 230, 211, 0.7);
    font-size: 0.9rem;
}

.control-hint p {
    margin-bottom: 6px;
}

/* ===== OVERLAYS & MODALS ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.overlay-content {
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.98) 0%, rgba(18, 14, 10, 0.99) 100%);
    border: 3px solid rgba(212, 175, 55, 0.6);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) rgba(0, 0, 0, 0.3);
    text-align: center;
    box-shadow: var(--shadow-lg), 0 0 50px rgba(212,175,55,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
    animation: scaleIn 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
}

/* Custom scrollbar for overlay modal content */
.overlay-content::-webkit-scrollbar {
    width: 8px;
}

.overlay-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin: 16px 0;
}

.overlay-content::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
    border: 1px solid rgba(18, 14, 10, 0.8);
}

.overlay-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--gradient-gold);
    border-radius: 24px 24px 0 0;
}

@keyframes scaleIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.overlay-content.danger {
    border-color: rgba(231, 76, 60, 0.6);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(231, 76, 60, 0.2);
}

.overlay-content.danger::before {
    background: var(--gradient-terracotta);
}

.overlay-content h2 {
    font-family: var(--font-serif-decorative);
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--secondary);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.overlay-content.danger h2 {
    color: #FF6B6B;
}

.overlay-content button {
    display: block;
    width: 100%;
    padding: 16px;
    margin: 12px 0;
    border: 2px solid transparent;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overlay-content button:first-of-type {
    background: var(--gradient-gold);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.overlay-content button:not(:first-of-type) {
    background: transparent;
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--text-light);
}

.overlay-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Typing Challenge */
.typing-section {
    margin-top: 20px;
}

.word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 16px 0;
    padding: 20px;
    background: rgba(0,0,0,0.35);
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.word-bank .word {
    background: linear-gradient(135deg, var(--primary) 0%, #7D2311 100%);
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #F5E6D3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

#typingInput {
    width: 100%;
    min-height: 120px;
    padding: 18px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 14px;
    background: rgba(18, 14, 10, 0.6);
    color: var(--text-light);
    font-size: 1rem;
    font-family: var(--font-primary);
    resize: vertical;
    margin: 16px 0;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
    transition: all 0.3s;
}

#typingInput:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 15px rgba(212, 175, 55, 0.2);
}

/* Quiz Section */
.quiz-section {
    margin-top: 24px;
}

.question {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 24px;
    font-weight: 600;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.option-btn {
    padding: 18px 20px;
    background: rgba(30, 23, 18, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 14px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: left;
    font-size: 1rem;
    font-family: var(--font-primary);
    line-height: 1.4;
}

.option-btn:hover {
    background: linear-gradient(135deg, rgba(82, 41, 24, 0.8) 0%, rgba(51, 23, 14, 0.9) 100%);
    border-color: var(--secondary);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.option-btn.correct {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(39, 174, 96, 0.4) 100%);
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
}

.option-btn.wrong {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.3) 0%, rgba(192, 57, 43, 0.4) 100%);
    border-color: var(--danger);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.3);
}

/* ===== TEGES QUIZ STYLING ===== */
.teges-question {
    font-family: var(--font-javanese);
    font-size: var(--text-xl);
    color: var(--secondary);
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.8) 0%, rgba(18, 14, 10, 0.9) 100%);
    border-radius: var(--radius-md);
    border: 2px solid rgba(212, 175, 55, 0.3);
    text-align: center;
    line-height: 1.6;
}

.teges-question strong {
    font-size: var(--text-2xl);
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-light);
}

.teges-question small {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.quiz-option {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.6) 0%, rgba(18, 14, 10, 0.7) 100%);
    border: 2px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-md);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: left;
    font-size: var(--text-base);
    font-family: var(--font-primary);
    line-height: 1.5;
}

.quiz-option:hover {
    background: linear-gradient(135deg, rgba(82, 41, 24, 0.8) 0%, rgba(51, 23, 14, 0.9) 100%);
    border-color: var(--secondary);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4), 0 0 10px rgba(212, 175, 55, 0.2);
}

.quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-option.correct {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(39, 174, 96, 0.5) 100%);
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
    transform: translateX(8px);
}

.quiz-option.wrong {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.3) 0%, rgba(192, 57, 43, 0.5) 100%);
    border-color: var(--danger);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.4);
}

.quiz-feedback {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    margin-top: 16px;
    animation: popIn 0.4s ease;
}

.quiz-feedback.success {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(39, 174, 96, 0.3) 100%);
    border: 2px solid var(--success);
    color: var(--success);
}

.quiz-feedback.error {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.3) 100%);
    border: 2px solid var(--danger);
    color: var(--danger);
}

.timer {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: #FF6B6B;
    font-weight: 700;
    margin-top: 20px;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

/* Room Info */
.room-info {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.97) 0%, rgba(18, 14, 10, 0.99) 100%);
    padding: 24px 48px;
    border-radius: 16px;
    border: 2px solid rgba(212, 175, 55, 0.6);
    text-align: center;
    z-index: 100;
    animation: slideDown 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 20px rgba(212, 175, 55, 0.15);
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-120%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.room-info h3 {
    font-family: var(--font-serif);
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

/* ===== EVALUASI SCREEN ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-item {
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.8) 0%, rgba(18, 14, 10, 0.9) 100%);
    padding: 24px 16px;
    border-radius: 16px;
    text-align: center;
    border: 2px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: rgba(212, 175, 55, 0.6);
    transform: translateY(-4px);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(245, 230, 211, 0.65);
    margin-bottom: 10px;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    display: block;
    font-family: var(--font-serif-decorative);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Wrap and auto-scale player name in stats grid to prevent overflow (Fase 7 - Unlocked) */
#statName {
    font-size: 1.4rem;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.progress-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-item span {
    font-weight: 700;
    color: var(--secondary);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.progress-bar {
    height: 28px;
    background: rgba(0,0,0,0.4);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-gold);
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 14px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* ===== TUTORIAL STYLES ===== */
.tutorial-content {
    max-width: 500px;
}

.tutorial-content h2 {
    margin-bottom: 28px;
    font-family: var(--font-serif-decorative);
    font-size: 1.9rem;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
    text-align: left;
}

.tutorial-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(0,0,0,0.25);
    border-radius: 14px;
    border-left: 4px solid var(--secondary);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-right: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.2s ease;
}

.tutorial-step:hover {
    background: rgba(18, 14, 10, 0.5);
    border-color: rgba(212, 175, 55, 0.4);
}

.step-icon {
    font-size: 1.6rem;
    min-width: 44px;
    text-align: center;
}

.tutorial-step p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(245, 230, 211, 0.9);
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--text-dark);
    border: none;
    padding: 16px 32px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.dont-show {
    display: block;
    margin-top: 18px;
    color: rgba(245, 230, 211, 0.6);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s;
}

.dont-show:hover {
    color: rgba(245, 230, 211, 0.9);
}

.dont-show input {
    margin-right: 8px;
    accent-color: var(--secondary);
}

/* ===== MINIMAP ===== */
.minimap {
    position: fixed;
    top: 90px;
    right: 20px;
    width: 150px;
    height: 112px;
    background: linear-gradient(135deg, rgba(18, 14, 10, 0.95) 0%, rgba(30, 23, 18, 0.9) 100%);
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 12px;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(0,0,0,0.7);
}

.minimap canvas {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* ===== PARTICLE EFFECTS ===== */
.particle {
    position: absolute;
    pointer-events: none;
    animation: particleFloat 1s ease-out forwards;
}

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

/* ===== SCREEN SHAKE ===== */
.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(1.2);
        opacity: 0;
    }
}

/* ===== AUDIO CONTROLS ===== */
.audio-controls {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 14px;
    margin: 18px 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.audio-controls h4 {
    margin: 0 0 14px 0;
    color: var(--secondary);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.audio-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 14px;
    color: rgba(245, 230, 211, 0.9);
    font-size: 0.95rem;
}

.audio-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-control span {
    font-size: 0.9rem;
    min-width: 60px;
    color: rgba(245, 230, 211, 0.7);
}

.volume-control input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 3px;
    outline: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--gradient-gold);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--secondary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* ===== LEVEL BUTTONS ===== */
.level-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.level-buttons button {
    flex: 1;
    max-width: 200px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#backLevelBtn {
    background: var(--gradient-terracotta);
    color: var(--text-light);
}

#nextLevelBtn {
    background: var(--gradient-gold);
    color: var(--text-dark);
}

.level-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== VALIDATION MESSAGE ===== */
.validation-msg {
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
    font-weight: 600;
}

.validation-msg.success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.validation-msg.error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

.used-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    justify-content: center;
}

.used-word {
    background: var(--primary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.9rem;
}

.used-word.found {
    background: #2ecc71;
    color: white;
}

.used-word.missing {
    background: #e74c3c;
    opacity: 0.5;
}

.typing-stats {
    text-align: right;
    color: rgba(245,245,245,0.7);
    font-size: 0.85rem;
    margin: 8px 0;
}

/* ===== ENHANCED RESPONSIVE DESIGN ===== */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .menu-container {
        flex-direction: column;
        gap: 40px;
        padding: 40px 24px;
    }

    .menu-left-panel {
        text-align: center;
        align-items: center;
        max-width: 100%;
    }

    .menu-left-panel .logo-section::before {
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
    }

    .divider-line {
        justify-content: center;
    }

    .divider-line .line {
        max-width: 60px;
    }

    .menu-right-panel {
        width: 100%;
    }

    .menu-grid {
        max-width: 600px;
        margin: 0 auto;
    }

    .main-title {
        font-size: var(--text-4xl);
    }

    .surya-emblem {
        width: 120px;
        height: 120px;
    }

    .content-container {
        padding: 20px;
    }
}

/* Tablets and large phones */
@media (max-width: 768px) {
    body::after {
        border-width: 4px;
    }

    .main-title {
        font-size: var(--text-3xl);
    }

    .museum-label {
        font-size: var(--text-base);
        letter-spacing: 4px;
    }

    .subtitle {
        font-size: var(--text-lg);
    }

    .surya-emblem {
        width: 100px;
        height: 100px;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        max-width: 400px;
    }

    .menu-card[data-screen="evaluasi"] {
        grid-column: 1 / span 2;
    }

    .menu-card {
        min-height: 140px;
        padding: 20px 14px;
        border-radius: var(--radius-md);
    }

    .card-icon-wrapper {
        width: 56px;
        height: 56px;
    }

    .card-label {
        font-size: var(--text-xs);
    }

    .game-title {
        font-size: var(--text-4xl);
    }

    .game-subtitle {
        font-size: var(--text-lg);
    }

    #gameCanvas {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 65vh;
    }

    .game-header {
        flex-wrap: wrap;
        gap: 12px;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        padding: 14px 18px;
    }

    .game-controls {
        flex-direction: column;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        padding: 16px 18px;
    }

    .control-hint {
        text-align: center;
    }

    .overlay-content {
        padding: 32px 24px;
        margin: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-item {
        padding: 20px 14px;
    }

    .stat-value {
        font-size: var(--text-xl);
    }

    .tabs {
        gap: 10px;
        padding-bottom: 6px;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: var(--text-sm);
    }

    .content-container h2 {
        font-size: var(--text-2xl);
    }

    .content-container h2::after {
        width: 80px;
    }

    .card {
        padding: 24px;
        border-radius: var(--radius-lg);
    }

    .card h3 {
        font-size: var(--text-xl);
    }

    .btn-save, .btn-back, .btn-danger {
        padding: 14px 28px;
        font-size: var(--text-sm);
    }

    .form-group input {
        padding: 14px 18px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .screen {
        padding: 16px;
    }

    .surya-emblem {
        width: 80px;
        height: 80px;
    }

    .cover-content .surya-emblem {
        width: 100px;
        height: 100px;
    }

    .cover-content .logo-section::before {
        width: 120px;
        height: 120px;
    }

    .main-title {
        font-size: var(--text-2xl);
    }

    .museum-label {
        font-size: var(--text-sm);
        letter-spacing: 3px;
    }

    .subtitle {
        font-size: var(--text-base);
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 280px;
    }

    .menu-card[data-screen="evaluasi"] {
        grid-column: 1;
    }

    .menu-card {
        min-height: 100px;
        padding: 16px 12px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
    }

    .card-icon-wrapper {
        width: 44px;
        height: 44px;
    }

    .card-label {
        font-size: var(--text-sm);
        text-align: left;
    }

    .game-title {
        font-size: var(--text-3xl);
    }

    .game-subtitle {
        font-size: var(--text-base);
    }

    .majapahit-pattern {
        width: 200px;
    }

    .start-btn {
        padding: 16px 40px;
        font-size: var(--text-sm);
        letter-spacing: 2px;
    }

    .content-container {
        padding: 12px;
    }

    .content-container h2 {
        font-size: var(--text-xl);
    }

    .content-container h2::after {
        width: 60px;
        height: 2px;
    }

    .card {
        padding: 20px;
        border-radius: var(--radius-md);
    }

    .card h3 {
        font-size: var(--text-lg);
    }

    .card h4 {
        font-size: var(--text-base);
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: var(--text-xs);
        flex: 1;
        min-width: 80px;
    }

    .tabs {
        gap: 8px;
    }

    .example-item {
        padding: 16px 18px;
    }

    .example-item .phrase {
        font-size: var(--text-base);
    }

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

    .overlay-content {
        padding: 24px 16px;
        margin: 12px;
    }

    .overlay-content h2 {
        font-size: var(--text-xl);
    }

    .btn-save, .btn-back, .btn-danger {
        padding: 12px 24px;
        font-size: var(--text-xs);
        letter-spacing: 1px;
    }

    .guide-item {
        padding: 20px;
    }

    .example-box {
        padding: 16px;
    }

    .definition {
        padding: 16px 18px;
        font-size: var(--text-base);
    }

    .form-group input {
        padding: 12px 16px;
    }
}

/* Extra small phones */
@media (max-width: 360px) {
    .menu-card {
        min-height: 90px;
        padding: 14px 10px;
    }

    .card-icon-wrapper {
        width: 40px;
        height: 40px;
    }

    .card-label {
        font-size: var(--text-xs);
    }

    .game-title {
        font-size: var(--text-2xl);
    }

    .main-title {
        font-size: var(--text-xl);
    }
}

/* ===== ENHANCED ANIMATIONS ===== */

/* Screen shake animation */
@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5px, -5px); }
    20% { transform: translate(5px, 5px); }
    30% { transform: translate(-5px, 5px); }
    40% { transform: translate(5px, -5px); }
    50% { transform: translate(-3px, 3px); }
    60% { transform: translate(3px, -3px); }
    70% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, -2px); }
    90% { transform: translate(-1px, 1px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Pulse glow animation */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary); }
    50% { box-shadow: 0 0 20px var(--primary), 0 0 30px var(--primary); }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

/* Slide in animation */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

/* Bounce in animation */
@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bounce-in {
    animation: bounceIn 0.4s ease-out;
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn-ripple:active::after {
    width: 200%;
    height: 200%;
}

/* Loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Glow border animation */
@keyframes borderGlow {
    0%, 100% { border-color: var(--primary); }
    50% { border-color: var(--secondary); }
}

.glow-border {
    animation: borderGlow 2s ease-in-out infinite;
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Shake horizontal for errors */
@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-x {
    animation: shakeX 0.4s ease-in-out;
}

/* Typing section visibility */
.typing-section {
    display: block;
}

.typing-section.hidden {
    display: none !important;
}

/* Challenge words visibility */
#challengeWords {
    min-height: 50px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    margin: 10px 0;
}

.word-tag {
    display: inline-block;
    padding: 5px 12px;
    margin: 4px;
    background: var(--primary);
    color: var(--dark);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.word-tag.used {
    background: #2ecc71;
    color: white;
}

.no-words {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* ===== SPLASH SCREEN / COVER SCREEN ===== */
#coverScreen {
    justify-content: center;
    background: 
        radial-gradient(ellipse at center top, rgba(212,175,55,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at center bottom, rgba(158,58,37,0.1) 0%, transparent 50%),
        linear-gradient(rgba(13, 10, 7, 0.6), rgba(13, 10, 7, 0.85)),
        url('../bg_majapahit.png');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* Particle effect overlay for splash screen */
#coverScreen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212,175,55,0.15) 0%, transparent 2%),
        radial-gradient(circle at 80% 70%, rgba(212,175,55,0.15) 0%, transparent 2%),
        radial-gradient(circle at 40% 80%, rgba(212,175,55,0.1) 0%, transparent 2%),
        radial-gradient(circle at 60% 20%, rgba(212,175,55,0.1) 0%, transparent 2%);
    animation: particleFloat 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 1; }
}

.cover-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 2;
}

.cover-content {
    text-align: center;
    max-width: 900px;
    padding: 40px;
    animation: fadeInUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    position: relative;
}

/* Majapahit decorative frame */
.cover-content::before,
.cover-content::after {
    content: '❦';
    position: absolute;
    font-size: 1.5rem;
    color: var(--secondary);
    opacity: 0.6;
}

.cover-content::before {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.cover-content::after {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.cover-content .logo-section {
    margin-bottom: 32px;
    position: relative;
}

/* Glow ring around emblem */
.cover-content .logo-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border: 2px solid rgba(212,175,55,0.2);
    border-radius: 50%;
    animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.6; }
}

.cover-content .surya-emblem {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    filter: drop-shadow(0 8px 24px rgba(212,175,55,0.6));
    animation: emblemFloat 4s ease-in-out infinite, emblemRotate 20s linear infinite;
}

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

@keyframes emblemRotate {
    0% { filter: drop-shadow(0 8px 24px rgba(212,175,55,0.6)) hue-rotate(0deg); }
    100% { filter: drop-shadow(0 8px 24px rgba(212,175,55,0.6)) hue-rotate(360deg); }
}

/* Title styling with enhanced typography */
.game-title {
    font-family: var(--font-display);
    font-size: var(--text-6xl);
    font-weight: 700;
    letter-spacing: 0.05em;
    background: var(--gradient-gold-shine);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    text-shadow: none;
    animation: titleShimmer 4s ease-in-out infinite, titleScale 0.8s ease-out forwards;
    transform-origin: center;
}

@keyframes titleShimmer {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 30px rgba(212,175,55,0.5)); }
    50% { filter: brightness(1.3) drop-shadow(0 0 50px rgba(212,175,55,0.8)); }
}

@keyframes titleScale {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.game-subtitle {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    color: var(--secondary-light);
    margin-bottom: 48px;
    font-style: italic;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    letter-spacing: 0.1em;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

/* Enhanced decoration with traditional motifs */
.cover-decoration {
    position: relative;
    margin: 48px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.majapahit-pattern {
    width: 300px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--secondary-dark) 20%, 
        var(--secondary) 50%, 
        var(--secondary-dark) 80%, 
        transparent 100%
    );
    position: relative;
}

.majapahit-pattern::before,
.majapahit-pattern::after {
    content: '◆';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    font-size: 0.8rem;
}

.majapahit-pattern::before { left: -20px; }
.majapahit-pattern::after { right: -20px; }

/* Enhanced Start Button */
.start-btn {
    background: var(--gradient-gold-shine);
    color: var(--text-dark);
    border: 3px solid transparent;
    border-image: linear-gradient(135deg, var(--secondary-dark), var(--secondary-light), var(--secondary-dark)) 1;
    padding: 22px 64px;
    font-size: var(--text-lg);
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 30px rgba(212,175,55,0.4), inset 0 2px 4px rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
    animation: btnPulse 2s infinite, fadeInUp 1s ease-out 0.6s backwards;
    font-family: var(--font-primary);
}

.start-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.start-btn:hover::before {
    left: 100%;
}

.start-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 40px rgba(212,175,55,0.6), inset 0 2px 4px rgba(255,255,255,0.4);
    border-image: linear-gradient(135deg, var(--secondary), var(--secondary-light), var(--secondary)) 1;
}

.start-btn:active {
    transform: translateY(-2px) scale(1.01);
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 8px 30px rgba(212,175,55,0.4), inset 0 2px 4px rgba(255,255,255,0.3); }
    50% { box-shadow: 0 8px 40px rgba(212,175,55,0.7), inset 0 2px 4px rgba(255,255,255,0.5); }
}

/* Responsive splash screen */
@media (max-width: 768px) {
    .game-title {
        font-size: var(--text-4xl);
    }
    
    .cover-content .surya-emblem {
        width: 120px;
        height: 120px;
    }
    
    .start-btn {
        padding: 18px 48px;
        font-size: var(--text-base);
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: var(--text-3xl);
    }

    .game-subtitle {
        font-size: var(--text-lg);
    }
}

/* ===== LOGIN SYSTEM STYLES ===== */
.role-selection {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.role-btn {
    flex: 1;
    min-width: 100px;
    padding: 20px 16px;
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.6) 0%, rgba(18, 14, 10, 0.7) 100%);
    border: 2px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.role-btn:hover {
    background: linear-gradient(135deg, rgba(82, 41, 24, 0.8) 0%, rgba(51, 23, 14, 0.9) 100%);
    border-color: var(--secondary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.role-btn.active {
    background: linear-gradient(135deg, rgba(158, 58, 37, 0.8) 0%, rgba(125, 35, 17, 0.9) 100%);
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.role-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.role-btn .mj-icon {
    width: 2.2rem;
    height: 2.2rem;
    color: var(--secondary-light);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    transition: color 0.3s ease, transform 0.3s ease;
}

.role-btn:hover .mj-icon, .role-btn.active .mj-icon {
    color: var(--secondary);
    transform: scale(1.1);
}

.role-label {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    color: var(--text-light);
    font-weight: 600;
}

.role-fields {
    animation: fadeIn 0.3s ease;
}

.message {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-top: 16px;
    font-weight: 500;
    text-align: center;
}

.message.success {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(39, 174, 96, 0.3) 100%);
    border: 1px solid var(--success);
    color: var(--success);
}

.message.error {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.3) 100%);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* ===== DASHBOARD STYLES ===== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.dashboard-header h2 {
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-logout {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.3) 0%, rgba(192, 57, 43, 0.4) 100%);
    border: 1px solid var(--danger);
    color: var(--danger);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--text-sm);
}

.btn-logout:hover {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.5) 0%, rgba(192, 57, 43, 0.6) 100%);
    transform: translateY(-2px);
}

.filter-card {
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.7) 0%, rgba(18, 14, 10, 0.8) 100%);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.filter-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 12px 24px;
    background: var(--gradient-gold);
    color: var(--text-dark);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-export {
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(39, 174, 96, 0.4) 100%);
    border: 1px solid var(--success);
    color: var(--success);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-export:hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.5) 0%, rgba(39, 174, 96, 0.6) 100%);
    transform: translateY(-2px);
}

.data-table {
    overflow-x: auto;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.data-table th {
    background: linear-gradient(135deg, rgba(158, 58, 37, 0.6) 0%, rgba(125, 35, 17, 0.7) 100%);
    color: var(--text-light);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--secondary);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    color: var(--text-light);
}

.data-table tr:hover {
    background: rgba(212, 175, 55, 0.05);
}

.leaderboard-card {
    background: linear-gradient(135deg, rgba(158, 58, 37, 0.2) 0%, rgba(125, 35, 17, 0.3) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
}

/* ===== ADMIN PANEL STYLES ===== */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.6) 0%, rgba(18, 14, 10, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--text-muted);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    background: linear-gradient(135deg, rgba(82, 41, 24, 0.8) 0%, rgba(51, 23, 14, 0.9) 100%);
    border-color: var(--secondary);
    color: var(--text-light);
}

.tab-btn.active {
    background: var(--gradient-gold);
    border-color: var(--secondary);
    color: var(--text-dark);
    font-weight: 600;
}

.admin-tab-content {
    animation: fadeIn 0.3s ease;
}

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

/* Lives Display */
.lives-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.5rem;
}

.lives-display .life {
    color: #e74c3c;
    transition: all 0.3s ease;
}

.lives-display .life.lost {
    color: rgba(231, 76, 60, 0.3);
    transform: scale(0.8);
}

/* Touch Controls */
.touch-controls {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

@media (hover: none) and (pointer: coarse) {
    .touch-controls {
        display: flex;
        gap: 20px;
    }

    .touch-btn {
        width: 80px;
        height: 80px;
        background: rgba(30, 23, 18, 0.8);
        border: 2px solid rgba(212, 175, 55, 0.5);
        border-radius: 50%;
        color: var(--secondary);
        font-size: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        user-select: none;
        -webkit-user-select: none;
        touch-action: manipulation;
    }

    .touch-btn:active {
        background: rgba(212, 175, 55, 0.3);
    }
}

/* ===== USER PROFILE HEADER ===== */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.9) 0%, rgba(18, 14, 10, 0.95) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 50px;
    padding: 8px 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--secondary);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.profile-avatar.admin {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--dark);
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-name {
    font-weight: 700;
    color: var(--text-light);
    font-size: var(--text-base);
}

.profile-role {
    font-size: var(--text-xs);
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.btn-logout:hover {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(231, 76, 60, 0.2);
}

/* ===== LOGIN/REGISTER TABS ===== */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 8px;
}

.auth-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

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

.auth-tab.active {
    color: var(--secondary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--secondary);
}

/* ===== USER PROFILE HEADER ===== */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.9) 0%, rgba(18, 14, 10, 0.95) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 50px;
    padding: 8px 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--secondary);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.profile-avatar.admin {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--dark);
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-name {
    font-weight: 700;
    color: var(--text-light);
    font-size: var(--text-base);
}

.profile-role {
    font-size: var(--text-xs);
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.btn-logout:hover {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(231, 76, 60, 0.2);
}

/* ===== CUSTOM DROPDOWN (Majapahit Theme) ===== */
.custom-select-wrapper {
    position: relative;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.9) 0%, rgba(18, 14, 10, 0.95) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-md);
    padding: 12px 40px 12px 16px;
    color: var(--text-light);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.custom-select:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.custom-select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.custom-select option {
    background-color: var(--bg-medium);
    color: var(--text-light);
    padding: 10px;
}

/* Global fallback for dropdown option readability across all browsers (Fase 7 - Unlocked) */
select option {
    background-color: #120E0A !important;
    color: #F5E6D3 !important;
}

.custom-select option:hover,
.custom-select option:focus {
    background-color: var(--primary);
}

/* ===== LOGIN/REGISTER TABS ===== */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 8px;
}

.auth-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

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

.auth-tab.active {
    color: var(--secondary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--secondary);
}

/* ===== GURU CONTENT MANAGEMENT PANEL ===== */
.content-editor {
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.8) 0%, rgba(18, 14, 10, 0.9) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 20px;
}

.editor-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.editor-tab {
    background: rgba(30, 23, 18, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    color: var(--text-light);
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.editor-tab:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--secondary);
}

.editor-tab.active {
    background: var(--primary);
    border-color: var(--secondary);
    color: var(--secondary);
    font-weight: 600;
}

.editor-content {
    min-height: 300px;
}

.editor-textarea {
    width: 100%;
    min-height: 300px;
    background: rgba(10, 8, 6, 0.8);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--text-light);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    resize: vertical;
}

.editor-textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

/* ===== AUTH TABS (Login/Register) ===== */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 8px;
}

.auth-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

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

.auth-tab.active {
    color: var(--secondary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--secondary);
}

/* ===== USER PROFILE HEADER ===== */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(30, 23, 18, 0.9) 0%, rgba(18, 14, 10, 0.95) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 50px;
    padding: 8px 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--secondary);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.profile-avatar.admin {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--dark);
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-name {
    font-weight: 700;
    color: var(--text-light);
    font-size: var(--text-base);
}

.profile-role {
    font-size: var(--text-xs);
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.btn-logout:hover {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(231, 76, 60, 0.2);
}

/* ===== VIDEO EMBED CONTAINER ===== */
.video-embed-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 15px auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-dark);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.video-embed-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

.video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 100%);
    border: 2px dashed rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
}

/* ===== KEYBOARD KEY STYLING ===== */
kbd {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.8rem;
    font-family: 'Plus Jakarta Sans', monospace;
    color: var(--text-light);
    background: var(--bg-dark);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
    margin: 0 2px;
}

/* ===== QUIZ FEEDBACK STYLES ===== */
.quiz-feedback {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    font-weight: 500;
}

.quiz-feedback.success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.quiz-feedback.error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.quiz-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    margin: 6px 0;
    background: var(--bg-medium);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.quiz-option:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--secondary);
}

.quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-option.correct {
    background: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
}

.quiz-option.wrong {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
}

/* Mini Prasasti Shape for instructions and legends */
.dot-prasasti {
    display: inline-block;
    width: 14px;
    height: 18px;
    position: relative;
    background: linear-gradient(135deg, #e67e22, #D4AF37);
    border: 1px solid #ffd700;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
    clip-path: polygon(0% 100%, 0% 25%, 15% 25%, 15% 12%, 35% 0%, 65% 0%, 85% 12%, 85% 25%, 100% 25%, 100% 100%);
    vertical-align: middle;
}
.dot-prasasti.grey {
    background: linear-gradient(135deg, #7f8c8d, #2c3e50);
    border: 1px solid #bdc3c7;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}