:root {
    --bg-color: #2c3e50;
    --card-bg: #ecf0f1;
    --primary: #8e44ad; /* Purple */
    --primary-dark: #732d91;
    --accent: #f1c40f; /* Yellow */
    --danger: #e74c3c; /* Red */
    --text: #2c3e50;
    --font-head: 'Fredoka One', cursive;
    --font-body: 'Patrick Hand', cursive;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    background-image: radial-gradient(#34495e 15%, transparent 16%), radial-gradient(#34495e 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    color: white;
    text-align: center;
    margin: 0;
    padding: 20px;
    font-size: 20px;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
}

h1.logo {
    font-family: var(--font-head);
    font-size: 3rem;
    color: var(--accent);
    text-shadow: 4px 4px 0px #000;
    margin-bottom: 10px;
    transform: rotate(-2deg);
}

h2, h3 {
    font-family: var(--font-head);
    color: var(--text);
    margin-top: 0;
}

.card {
    background: var(--card-bg);
    color: var(--text);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 0 rgba(0,0,0,0.2);
    margin-bottom: 20px;
    text-align: left;
}

/* INPUTS & SELECTS */
input, select {
    width: 100%;
    padding: 15px;
    font-size: 22px;
    border: 3px solid #bdc3c7;
    border-radius: 12px;
    font-family: var(--font-head);
    box-sizing: border-box;
    margin-bottom: 15px;
    background: white;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

/* BUTTONS */
button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-family: var(--font-head);
    font-size: 20px;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.1s;
    box-shadow: 0 6px 0 rgba(0,0,0,0.2);
    margin-bottom: 10px;
    color: white;
}

button:active {
    transform: translateY(6px);
    box-shadow: none;
}

.btn-primary { background-color: var(--primary); }
.btn-danger { background-color: var(--danger); }
.btn-secondary { background-color: #95a5a6; }

.big-btn {
    font-size: 28px;
    padding: 20px;
    background-color: var(--accent);
    color: #2c3e50;
}

/* UTILS */
.hidden { display: none !important; }

.button-row {
    display: flex;
    gap: 10px;
}

.room-badge {
    background: var(--accent);
    color: var(--text);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 1.2rem;
    margin-bottom: 10px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
}

/* VOTING GRID */
.grid-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.grid-buttons button {
    height: 100%;
    font-size: 18px;
    background: white;
    color: var(--text);
    border: 3px solid var(--text);
}

/* RESULTS PAGE */
.story-box {
    font-family: var(--font-body);
    font-size: 24px;
    line-height: 1.6;
    background: #fff;       /* White Paper */
    color: #2c3e50;         /* <--- THIS FIXES IT (Dark Text) */
    padding: 30px;
    border-radius: 5px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
    transform: rotate(1deg);
    margin-bottom: 20px;
}

b {
    background: var(--accent);
    padding: 0 5px;
    border-radius: 5px;
    color: black;
    text-decoration: none;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* ANIMATIONS */
.fade-in { animation: fadeIn 0.5s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.pulse { animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }


/* FOOTER */
footer {
    margin-top: 50px;
    font-size: 0.8rem;
    opacity: 0.7;
}
footer a {
    color: var(--accent);
    text-decoration: none;
}

/* SPLASH SCREEN */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 1s ease-in-out 2s forwards; /* Wait 2s, then fade out */
    pointer-events: none; /* Let clicks pass through after it fades */
}

.studio-logo {
    font-family: var(--font-head);
    font-size: 3rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 5px;
    animation: scaleUp 2s ease-out;
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

@keyframes scaleUp {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
