* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    padding: 20px;
    border-radius: 10px;
    border: 3px solid #333;
    font-family: 'Comic Sans MS', cursive;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-in 2.7s;
    font-size: 1.1em;
}

.notification.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.notification.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.notification.info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(666deg, #9f01ad 0%, #ff93ed 100%);
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.title {
    text-align: center;
    font-size: 3em;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.subtitle {
    text-align: center;
    font-size: 1.3em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.game-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    border: 5px solid #fff;
}

.meter-container {
    margin-bottom: 30px;
}

.meter-label {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

.meter-bar {
    width: 100%;
    height: 50px;
    background: #e0e0e0;
    border-radius: 25px;
    overflow: hidden;
    border: 3px solid #333;
    position: relative;
}

.volume-fill {
    height: 100%;
    background: linear-gradient(666deg, #4CAF50 0%, #FFC107 50%, #F44336 100%);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 25px;
}

.db-display {
    text-align: center;
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin-top: 15px;
}

.threshold-indicator {
    text-align: center;
    color: #666;
    font-size: 1em;
    margin-top: 5px;
}

.status-display {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin: 20px 0;
    padding: 15px;
    background: #fff3cd;
    border-radius: 10px;
    border: 3px solid #333;
}

.status-display.shouting {
    background: #d4edda;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.status-display.failed {
    background: #f8d7da;
}

.timer-display {
    text-align: center;
    font-size: 3em;
    font-weight: bold;
    color: #333;
    margin: 20px 0;
}

.start-btn {
    display: block;
    width: 100%;
    padding: 20px;
    font-size: 1.8em;
    font-weight: bold;
    background: linear-gradient(666deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: 5px solid #333;
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

.start-btn:hover {
    transform: scale(1.05);
}

.start-btn:active {
    transform: scale(0.95);
}

.start-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.results-section {
    margin-top: 30px;
    padding: 20px;
    background: #fff3cd;
    border-radius: 15px;
    border: 3px solid #333;
}

.results-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.stat {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 3px solid #333;
    flex: 1;
    min-width: 150px;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    color: #333;
    font-size: 1.8em;
    font-weight: bold;
}

.name-input-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#playerName {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    font-size: 1.2em;
    border: 3px solid #333;
    border-radius: 10px;
    font-family: 'Comic Sans MS', cursive;
}

.submit-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    background: linear-gradient(666deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: 3px solid #333;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    transition: transform 0.1s;
}

.submit-btn:hover {
    transform: scale(1.05);
}

.submit-btn:active {
    transform: scale(0.95);
}

.leaderboard-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 5px solid #fff;
}

.leaderboard-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.leaderboard {
    background: white;
    border-radius: 10px;
    border: 3px solid #333;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #dee2e6;
    flex-wrap: wrap;
    gap: 10px;
}

.leaderboard-entry.top-1 {
    background: linear-gradient(666deg, #FFD700 0%, #FFA500 100%);
    border: 3px solid #333;
}

.leaderboard-entry.top-2 {
    background: linear-gradient(666deg, #C0C0C0 0%, #A8A8A8 100%);
    border: 3px solid #333;
}

.leaderboard-entry.top-3 {
    background: linear-gradient(666deg, #CD7F32 0%, #B8732D 100%);
    border: 3px solid #333;
}

.entry-rank {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    min-width: 40px;
    flex-shrink: 0;
}

.entry-name {
    flex: 1;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    min-width: 100px;
    word-break: break-word;
}

.entry-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    color: #555;
    flex-wrap: wrap;
}

.refresh-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 3px solid #333;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    transition: transform 0.1s;
}

.refresh-btn:hover {
    transform: scale(1.05);
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .title {
        font-size: 2em;
    }
    
    .game-section {
        padding: 20px;
    }
    
    .result-stats {
        flex-direction: column;
    }
    
    .leaderboard-section {
        padding: 15px;
    }
    
    .leaderboard {
        padding: 10px;
    }
    
    .leaderboard-entry {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .entry-rank {
        font-size: 1.2em;
        min-width: 35px;
    }
    
    .entry-name {
        font-size: 1em;
        width: 100%;
        order: 2;
    }
    
    .entry-stats {
        width: 100%;
        order: 3;
        gap: 8px;
        font-size: 0.85em;
        justify-content: space-between;
    }
    
    .notification-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .notification {
        font-size: 1em;
        padding: 15px;
    }
}
