/* Global Styles */
:root {
    --primary-color: #8C73C2;    /* Main purple */
    --primary-light: #BFB1E4;    /* Light purple */
    --primary-dark: #6A53A3;     /* Dark purple */
    --accent-color: #FF9F59;     /* Orange accent */
    --accent-secondary: #4EA5A8; /* Muted teal accent (replaced bright teal) */
    --text-light: #FFFFFF;
    --text-dark: #333333;
    --light-bg: #F1EAFF;
    --card-shadow: 0 6px 16px rgba(138, 116, 194, 0.15);
    --rounded-lg: 20px;
    --rounded-md: 15px;
    --rounded-sm: 10px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--light-bg);
    background-image: url('../images/background.svg');
    background-size: cover;
    background-attachment: fixed;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
}

.container-fluid {
    flex: 1;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Header Styles */
header {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: none !important;
}

header .fs-4 {
    color: var(--primary-dark);
    font-weight: bold;
    font-size: 2rem !important;
}

/* Button Styles */
.btn {
    border-radius: var(--rounded-sm);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(106, 83, 163, 0.25);
}

.btn-success {
    background-color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.btn-success:hover, .btn-success:focus {
    background-color: #3A7C7F; /* Darker muted teal for hover state */
    border-color: #3A7C7F;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(78, 165, 168, 0.25);
}

/* Card Styles */
.card {
    border-radius: var(--rounded-lg);
    border: none;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
    background-color: white;
}

.card-header {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-weight: bold;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: var(--rounded-sm);
    padding: 0.6rem 1rem;
    border: 2px solid #E0D9F5;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.25rem rgba(191, 177, 228, 0.25);
}

/* QR Code */
.qr-code-container {
    padding: 15px;
    background-color: white;
    border-radius: var(--rounded-md);
    margin: 0 auto;
    max-width: 200px;
    box-shadow: var(--card-shadow);
}

/* Game Area */
#game-area {
    transition: all 0.3s ease-in-out;
}

/* Round Timer */
.progress {
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #E0D9F5;
}

.progress-bar {
    background-color: var(--primary-color);
}

/* Badge Styles */
.badge {
    padding: 0.5em 1em;
    border-radius: var(--rounded-sm);
    font-weight: 600;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Leaderboard */
#leaderboard .list-group-item {
    transition: all 0.3s ease;
    border-radius: var(--rounded-sm);
    margin-bottom: 0.5rem;
    border: none;
    background-color: #F8F5FF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
}

#leaderboard .list-group-item.active {
    background-color: var(--primary-color);
    color: white;
}

/* Player Position Alert */
#player-position {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border: none;
    border-radius: var(--rounded-md);
}

/* Footer */
footer {
    background-color: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
}

footer .text-muted {
    color: var(--primary-dark) !important;
}

/* Alert Styles */
.alert {
    border-radius: var(--rounded-md);
    border: none;
}

.alert-success {
    background-color: #D4F7D4;
    color: #2B8A3E;
}

.alert-info {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

/* Spinner */
.spinner-border {
    color: var(--primary-color);
    width: 3rem;
    height: 3rem;
}

/* Waiting screen animation */
.waiting-pulse {
    animation: waitingPulse 2s infinite;
}

/* Album Cover */
#album-cover {
    border-radius: var(--rounded-md);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Decorative Elements */
.music-note {
    position: absolute;
    font-size: 2rem;
    color: var(--primary-light);
    opacity: 0.6;
    z-index: -1;
}

.decorative-shape {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: var(--accent-color);
    opacity: 0.3;
    border-radius: 50%;
    z-index: -1;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 1s infinite;
}

@keyframes waitingPulse {
    0% { background-color: rgba(138, 116, 194, 0.1); }
    50% { background-color: rgba(138, 116, 194, 0.2); }
    100% { background-color: rgba(138, 116, 194, 0.1); }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    :root {
        --rounded-lg: 15px;
        --rounded-md: 12px;
        --rounded-sm: 8px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
}

/* Top Round Scores styling */
#top-round-scores-section .card-header {
    background-color: var(--accent-secondary);
    color: white;
}

#top-round-scores-section {
    background-color: #F5F9FA; /* Lighter, more muted background */
} 
