/* Main Menu Styles */
.main-menu {
    background: var(--theme-bg-glass);
    backdrop-filter: var(--theme-backdrop-blur);
    border: 1px solid var(--theme-border-glass);
    border-radius: var(--border-radius);
    padding: 25px 30px;
    box-shadow: var(--theme-shadow-hard);
    max-width: 480px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
    
    /* Hide scrollbar for webkit browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.main-menu::-webkit-scrollbar {
    display: none; /* WebKit browsers */
}

/* Subtle scroll indicator */
.main-menu::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--theme-gradient-divider);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.main-menu.scrollable::after {
    opacity: 1;
}

.main-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--theme-border-glass), transparent);
}

.menu-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    background: var(--theme-gradient-title);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    position: relative;
}

.menu-subtitle {
    font-size: 1rem;
    color: var(--theme-text-secondary);
    margin-bottom: 25px;
    font-weight: 500;
}

/* Theme Selector */
.theme-selector-container {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    justify-content: center;
}

.theme-selector-title {
    font-size: 0.9rem;
    color: var(--theme-text-secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.theme-selector {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.theme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--theme-border-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Theme-specific preview colors */
.theme-swatch[data-theme="default"] {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
}

.theme-swatch[data-theme="light"] {
    background: linear-gradient(135deg, #fafbfc 0%, #f1f3f5 100%);
    border: 2px solid rgba(30, 40, 50, 0.2);
}

.theme-swatch[data-theme="neon"] {
    background: linear-gradient(135deg, #0a0014 0%, #1a0033 100%);
    box-shadow: 0 0 8px #00ffff;
}

.theme-swatch[data-theme="retro"] {
    background: linear-gradient(135deg, #2c1810 0%, #8b4513 100%);
}

.theme-swatch[data-theme="nature"] {
    background: linear-gradient(135deg, #31543c 0%, #4e784e 100%);
}

.theme-swatch:hover {
    transform: scale(1.1);
    border-color: var(--theme-accent-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-swatch.selected {
    border-color: var(--theme-accent-green);
    transform: scale(1.15);
    box-shadow: 0 0 12px var(--theme-accent-green);
}

.theme-swatch.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--theme-text-primary);
    font-weight: bold;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Focus states for accessibility */
.theme-swatch:focus {
    outline: none;
    border-color: var(--theme-accent-blue);
    box-shadow: 0 0 0 3px rgba(79, 143, 247, 0.3);
}

/* Special effects for neon theme swatch */
.theme-swatch[data-theme="neon"]:hover,
.theme-swatch[data-theme="neon"].selected {
    box-shadow: 0 0 15px #00ffff, 0 0 25px rgba(0, 255, 255, 0.3);
}

.game-mode-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.mode-card {
    background: var(--theme-bg-glass-light);
    border: 2px solid var(--theme-border-light);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--theme-gradient-card-shine);
    transition: left 0.5s ease;
}

.mode-card:hover::before {
    left: 100%;
}

.mode-card:hover {
    border-color: var(--theme-accent-blue);
    transform: translateY(-3px);
    box-shadow: var(--theme-shadow-card) var(--theme-blue-strong);
}

.mode-card.selected {
    border-color: var(--theme-accent-blue);
    background: var(--theme-blue-light);
    box-shadow: 0 0 30px var(--theme-blue-medium);
}

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

.mode-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin-bottom: 10px;
}

.mode-description {
    font-size: 0.95rem;
    color: var(--theme-text-secondary);
    line-height: 1.5;
}

/* Difficulty Selection */
.difficulty-selection {
    margin-top: 20px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.difficulty-selection.show {
    opacity: 1;
    max-height: 200px;
}

.difficulty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin-bottom: 15px;
}

.difficulty-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 10px 20px;
    border: 2px solid var(--theme-border-strong);
    border-radius: 10px;
    background: var(--theme-bg-glass-light);
    color: var(--theme-text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 80px;
}

.difficulty-btn:hover {
    border-color: var(--theme-accent-blue);
    background: var(--theme-blue-light);
    color: var(--theme-text-primary);
}

.difficulty-btn.selected {
    border-color: var(--theme-accent-blue);
    background: var(--theme-accent-blue);
    color: white;
    box-shadow: 0 0 20px var(--theme-blue-stronger);
}

.difficulty-btn.easy.selected {
    background: var(--theme-accent-green);
    border-color: var(--theme-accent-green);
    box-shadow: 0 0 20px var(--theme-green-stronger);
}

.difficulty-btn.medium.selected {
    background: var(--theme-accent-orange);
    border-color: var(--theme-accent-orange);
    box-shadow: 0 0 20px var(--theme-orange-light);
}

.difficulty-btn.hard.selected {
    background: var(--theme-accent-red);
    border-color: var(--theme-accent-red);
    box-shadow: 0 0 20px var(--theme-red-medium);
}

/* Start Game Button */
.start-game-btn {
    background: var(--theme-gradient-title);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
    opacity: 0.5;
    pointer-events: none;
}

.start-game-btn.enabled {
    opacity: 1;
    pointer-events: auto;
    box-shadow: var(--theme-shadow-button) var(--theme-blue-strong);
}

.start-game-btn.enabled:hover {
    transform: translateY(-3px);
    box-shadow: var(--theme-shadow-button-hover) var(--theme-blue-stronger);
}

/* Game Mode Info */
.game-mode-info {
    background: var(--theme-bg-glass-light);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--theme-border-light);
}

.game-mode-label {
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-mode-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--theme-text-primary);
}

