/* Menu Styles - Splash, Title, Mode Selection, Stage Selection */

/* Splash Screen */
.splash-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 20px;
}

.splash-logo {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounceIn 1s ease;
}

.splash-title {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.splash-subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    margin-bottom: 40px;
}

.splash-loading {
    font-size: 1em;
    opacity: 0.7;
}

@keyframes bounceIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Title Menu */
.title-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
    text-align: center;
}

.title-header {
    margin-bottom: 40px;
}

.title-logo {
    font-size: 3em;
    margin-bottom: 10px;
}

.title-text {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.title-subtitle {
    font-size: 1em;
    color: #666;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

.menu-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.menu-btn:active {
    transform: scale(0.98);
}

.menu-btn.primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    font-size: 1.3em;
}

.menu-btn.secondary {
    background: linear-gradient(135deg, #6c757d, #868e96);
    font-size: 1em;
}

/* Mode Selection */
.mode-selection {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.mode-header {
    text-align: center;
    margin-bottom: 30px;
}

.mode-title {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.mode-description {
    font-size: 1em;
    color: #666;
}

.mode-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    overflow-y: auto;
}

.mode-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.mode-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.mode-icon {
    font-size: 3em;
}

.mode-card-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.mode-card-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.mode-card-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
}

.mode-stat {
    background: rgba(102, 126, 234, 0.1);
    padding: 5px 10px;
    border-radius: 8px;
    color: #667eea;
    font-weight: bold;
}

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

/* Stage Selection */
.stage-selection {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.stage-header {
    text-align: center;
    margin-bottom: 20px;
}

.stage-mode-name {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stage-level-name {
    font-size: 1.2em;
    color: #667eea;
    margin-bottom: 10px;
}

.stage-progress {
    background: #e9ecef;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.stage-progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    transition: width 0.3s ease;
}

.stage-list {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding-bottom: 20px;
}

.stage-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.stage-card:hover:not(.locked) {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.stage-card.completed {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
}

.stage-card.current {
    background: linear-gradient(135deg, #fff3cd, #ffe69c);
    border-color: #ffc107;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.5);
}

.stage-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e9ecef;
}

.stage-number {
    font-size: 0.9em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stage-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stage-info {
    font-size: 0.75em;
    color: #666;
    margin-bottom: 8px;
}

.stage-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.8em;
}

.stage-status.completed {
    color: #28a745;
}

.stage-status.locked {
    color: #6c757d;
}

.stage-stars {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 5px;
}

.star {
    font-size: 1.2em;
}

.star.filled {
    color: #ffc107;
}

.star.empty {
    color: #dee2e6;
}

/* Level Selection Header */
.level-selection-header {
    margin-bottom: 20px;
}

.level-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-bottom: 15px;
}

.level-tab {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.9em;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.level-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.level-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

/* Responsive */
@media (min-width: 768px) {
    .stage-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 400px) {
    .splash-title {
        font-size: 2em;
    }

    .title-text {
        font-size: 1.5em;
    }

    .mode-title {
        font-size: 1.5em;
    }

    .stage-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
