:root {
    /* Purple Theme (Oldin Style) */
    --bg-color: #6200EA;
    --white: #FFFFFF;
    --text-dark: #2D0C57; /* Deep purple-black */
    --text-light: #9586A8;
    
    /* Shapes */
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --btn-radius: 50px;
    
    /* Shadows */
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.2);
    --btn-shadow-offset: 4px;

    /* Accents */
    --accent-yellow: #FFD54F;
    --accent-green: #00E676;
    --accent-blue: #2979FF;
    --accent-purple: #651FFF;
    
    /* Button Specifics from Screenshot */
    --btn-primary-bg: #58CC02; /* Vibrant Green for main actions */
    --btn-primary-shadow: #58A700;
    --btn-secondary-bg: #CE82FF; /* Soft Purple */
    --btn-secondary-shadow: #A462D4;
}

body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    
    /* Deep Purple Gradient */
    background: linear-gradient(180deg, #511598 0%, #260849 100%);
    background-attachment: fixed;
    
    color: var(--white);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    /* Add padding to bottom so content doesn't get hidden behind fixed footer */
    padding-bottom: 80px; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

/* Typography */
h1 {
    font-family: 'Nunito', sans-serif; /* Switch to clean sans-serif */
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--white);
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}


.listener-card h1, .game-over-head {
    -webkit-text-stroke: 0px;
    text-shadow: none;
}

h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-dark); /* Dark inside cards */
}

p {
    color: rgba(255, 255, 255, 0.9); /* Slightly transparent white on bg */
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Cards */
.card {
    background: var(--white);
    color: var(--text-dark); /* Reset text color for inside cards */
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card p {
    color: var(--text-light); /* Darker p text inside cards */
}

/* --- Buttons (Clean, Pill shaped) --- */
.action-btn {
    display: block;
    width: 100%;
    padding: 16px 0;
    margin-bottom: 16px;
    border-radius: 16px; /* Squircle shape */
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    text-align: center;
    border: 2px solid transparent; /* Base border */
    border-bottom-width: 4px; /* 3D Depth */
    cursor: pointer;
    transition: filter 0.1s, transform 0.1s, border-color 0.1s, background-color 0.1s;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    box-shadow: none;
}

.action-btn:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
    margin-bottom: 18px;
}

/* Button Variants */

/* White Button (Matches Screenshot) */
.btn-white {
    background-color: #FFFFFF;
    color: var(--text-dark); /* Deep Purple Text */
    border-color: #FFFFFF;
    border-bottom-color: #D9D9D9; /* Light Grey Shadow */
}

.btn-white:hover {
    background-color: #F2F2F2;
    border-color: #F2F2F2;
    border-bottom-color: #D9D9D9;
    filter: none; /* Remove brightness filter for white */
}

/* Vibrant Yellow (Primary/Attention) */
.btn-yellow {
    background-color: #FFC800;
    color: #4B4B4B;
    border-color: #FFC800;
    border-bottom-color: #D7A800;
}

.btn-yellow:hover {
    background-color: #FFD900;
    border-color: #FFD900;
    border-bottom-color: #D7A800;
}

/* Vibrant Green (Success/Go) */
.btn-green {
    background-color: #58CC02;
    color: #FFFFFF;
    border-color: #58CC02;
    border-bottom-color: #46A302;
}

.btn-green:hover {
    background-color: #61E002;
    border-color: #61E002;
    border-bottom-color: #46A302;
}

/* Vibrant Cyan/Blue (Info/Secondary) */
.btn-blue {
    background-color: #1CB0F6;
    color: white;
    border-color: #1CB0F6;
    border-bottom-color: #1899D6;
}

.btn-blue:hover {
    background-color: #22C0FF;
    border-color: #22C0FF;
    border-bottom-color: #1899D6;
}

/* Purple Button */
.btn-purple {
    background-color: #CE82FF;
    color: white;
    border-color: #CE82FF;
    border-bottom-color: #A462D4;
}

.btn-purple:hover {
    background-color: #D894FF;
    border-color: #D894FF;
    border-bottom-color: #A462D4;
}

/* Logo Placeholder */
.logo-placeholder {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15); /* Semi-transparent white */
    border-radius: 35px;
    margin: 20px auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: var(--white);
    font-size: 1.2rem;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
}

/* Main App Logo Image */
.app-logo {
    display: block;
    width: 240px;
    height: auto;
    margin: 30px auto 20px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
    transition: transform 0.3s ease;
}

.app-logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 15px 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    
    /* Fixed positioning to stick to bottom of screen */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    /* Semi-transparent background matching the bottom of the body gradient */
    background: rgba(38, 8, 73, 0.9); 
    backdrop-filter: blur(4px);
    box-sizing: border-box;
    /* Handle safe areas for mobile devices (iPhone X etc) */
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
}

.app-footer a {
    color: var(--white);
    text-decoration: none;
    margin: 0 8px;
    font-weight: 700;
    opacity: 0.8;
}

.app-footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Inputs */
input, select {
    width: 100%;
    padding: 16px;
    margin: 10px 0;
    font-size: 1.1rem;
    border: 2px solid #F0F0F0;
    border-radius: 16px;
    box-sizing: border-box;
    font-family: inherit;
    background: #F9F9F9;
    color: var(--text-dark);
    transition: all 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(101, 31, 255, 0.1);
}

/* Error State Styling */
input.error {
    border-color: #FF6B6B !important;
    background-color: #FFF0F0 !important;
    color: #D64545 !important;
    animation: shake 0.4s ease-in-out;
}

input.error::placeholder {
    color: rgba(214, 69, 69, 0.5);
}

.error-tooltip {
    color: #FF6B6B;
    font-size: 0.85rem;
    font-weight: 800;
    text-align: left;
    margin-top: -8px;
    margin-bottom: 12px;
    padding-left: 5px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }

/* Game Specific Overrides for this theme */
.role-badge {
    background: #EDE7F6;
    color: var(--accent-purple);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.option-btn {
    background: white;
    border: 2px solid #E5E5E5;
    border-bottom-width: 4px;
    border-radius: 16px;
    padding: 18px;
    font-weight: 700;
    color: var(--text-dark);
    box-shadow: none;
    transition: all 0.1s;
}

/* Updated Option Button Hover */
.option-btn:hover {
    transform: none;
    background-color: #F7F7F7;
    border-color: #E5E5E5; /* Keep grey border on hover unless selected */
}

.option-btn:active {
    border-bottom-width: 2px;
    transform: translateY(2px);
}

.option-btn.selected {
    background: #D7FFB8;
    color: #4B4B4B;
    border-color: #58CC02;
    border-bottom-color: #46A302;
    box-shadow: none;
}

/* Leaderboard Styles (Shared) */
.lb-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 35px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    font-weight: 700;
    align-items: center;
    color: white;
    transition: transform 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.lb-row:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.lb-rank-badge { 
    width: 40px; 
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.lb-info {
    display: flex;
    align-items: center;
}

.lb-score { 
    color: var(--accent-yellow); 
    font-weight: 900; 
    font-size: 1.2rem;
}

.lb-date { 
    font-size: 0.95rem; 
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600; 
}

/* Top 3 Styling */
.rank-1 {
    background: var(--accent-yellow);
    color: var(--text-dark);
    border: none;
    box-shadow: 0 10px 20px rgba(255, 213, 79, 0.3);
    transform: scale(1.02);
    margin-bottom: 20px;
}

.rank-1 .lb-rank-badge {
    background: rgba(0,0,0,0.1);
    color: var(--text-dark);
}

.rank-1 .lb-score { color: var(--text-dark); }
.rank-1 .lb-date { color: rgba(0,0,0,0.6); }

.rank-2 {
    background: white;
    color: var(--text-dark);
    border: none;
}
.rank-2 .lb-rank-badge { background: rgba(0,0,0,0.05); color: var(--text-dark); }
.rank-2 .lb-score { color: var(--text-dark); }
.rank-2 .lb-date { color: #666; }

.rank-3 {
    background: white;
    color: var(--text-dark);
    border: none;
}
.rank-3 .lb-rank-badge { background: rgba(0,0,0,0.05); color: var(--text-dark); }
.rank-3 .lb-score { color: var(--text-dark); }
.rank-3 .lb-date { color: #666; }
