/* CSS COMPLETO PER INDEX.HTML - index-style.css */

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER PRINCIPALE ===== */
.main-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 1s ease-out;
}

.logo-section {
    margin-bottom: 30px;
}

.main-title {
    font-size: 3.5em;
    color: white;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    font-weight: 900;
    letter-spacing: 2px;
}

.main-subtitle {
    font-size: 1.4em;
    color: #e0e7ff;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.intro-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.intro-text {
    font-size: 1.1em;
    color: #4a5568;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===== MENU PRINCIPALE ===== */
.main-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.modes-title {
    text-align: center;
    font-size: 2.2em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    font-weight: 800;
}

/* ===== GRID MODALITÀ GIOCO ===== */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.game-mode-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 25px;
    padding: 35px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.game-mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.game-mode-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    border-color: #667eea;
}

.game-mode-card:hover::before {
    transform: scaleX(1);
}

.visual-mode:hover {
    border-color: #4299e1;
}

.visual-mode::before {
    background: linear-gradient(90deg, #4299e1, #3182ce);
}

.audio-mode:hover {
    border-color: #10b981;
}

.audio-mode::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.mode-icon {
    font-size: 4em;
    margin-bottom: 20px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.mode-title {
    font-size: 2em;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.mode-description {
    font-size: 1.1em;
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.mode-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.feature {
    background: linear-gradient(45deg, #e2e8f0, #cbd5e0);
    color: #4a5568;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.visual-mode .feature {
    background: linear-gradient(45deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-color: #93c5fd;
}

.audio-mode .feature {
    background: linear-gradient(45deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-color: #6ee7b7;
}

.mode-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.visual-mode .mode-button {
    background: linear-gradient(45deg, #4299e1, #3182ce);
    box-shadow: 0 8px 20px rgba(66, 153, 225, 0.3);
}

.audio-mode .mode-button {
    background: linear-gradient(45deg, #10b981, #059669);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.game-mode-card:hover .mode-button {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(102, 126, 234, 0.4);
}

/* ===== SEZIONE CLASSIFICHE ===== */
.leaderboard-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: 1.8em;
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: 800;
}

.section-description {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1.1em;
}

.leaderboard-btn {
    display: inline-block;
    background: linear-gradient(45deg, #ffd89b, #19547b);
    color: white;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(255, 216, 155, 0.3);
    transition: all 0.3s ease;
}

.leaderboard-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 216, 155, 0.4);
}

/* ===== SEZIONE ISTRUZIONI ===== */
.how-it-works {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.instruction-card {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.instruction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #cbd5e0;
}

.instruction-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.instruction-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.instruction-text {
    color: #4a5568;
    line-height: 1.6;
}

/* ===== FOOTER ===== */
.main-footer {
    margin-top: 50px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    color: white;
}

.credits-section h4 {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: 800;
}

.credits-section p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.features-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.features-list span {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.powered-by {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.powered-by a {
    color: #ffd89b;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.powered-by a:hover {
    color: white;
}

/* ===== ANIMAZIONI ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-title {
        font-size: 2.5em;
    }
    
    .main-subtitle {
        font-size: 1.2em;
    }
    
    .modes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-mode-card {
        padding: 25px;
    }
    
    .mode-icon {
        font-size: 3em;
    }
    
    .mode-title {
        font-size: 1.6em;
    }
    
    .mode-features {
        gap: 10px;
    }
    
    .feature {
        font-size: 0.8em;
        padding: 6px 12px;
    }
    
    .instructions-grid {
        grid-template-columns: 1fr;
    }
    
    .features-list {
        gap: 10px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .main-title {
        font-size: 2em;
        line-height: 1.2;
    }
    
    .main-subtitle {
        font-size: 1em;
    }
    
    .intro-section {
        padding: 20px;
    }
    
    .intro-text {
        font-size: 1em;
    }
    
    .modes-title {
        font-size: 1.8em;
    }
    
    .game-mode-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .mode-icon {
        font-size: 2.5em;
    }
    
    .mode-title {
        font-size: 1.4em;
    }
    
    .mode-description {
        font-size: 1em;
    }
    
    .mode-features {
        flex-direction: column;
        gap: 8px;
    }
    
    .feature {
        align-self: center;
    }
    
    .mode-button {
        font-size: 1em;
        padding: 12px 25px;
    }
    
    .section-title {
        font-size: 1.5em;
    }
    
    .leaderboard-btn {
        font-size: 1em;
        padding: 12px 25px;
    }
    
    .main-footer {
        padding: 20px;
    }
    
    .features-list {
        flex-direction: column;
        gap: 8px;
    }
}

/* ===== SAFE AREA PER DISPOSITIVI CON NOTCH ===== */
body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.game-mode-card:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* ===== PERFORMANCE ===== */
.game-mode-card,
.leaderboard-btn,
.instruction-card {
    will-change: transform;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .intro-section,
    .leaderboard-section,
    .how-it-works {
        background: rgba(30, 41, 59, 0.95);
    }
    
    .intro-text,
    .section-description {
        color: #cbd5e0;
    }
    
    .section-title {
        color: #f1f5f9;
    }
}