:root {
    --primary: #46178f;
    --primary-dark: #331169;
    --secondary: #eb670f;
    --background: #f2f2f2;
    --white: #ffffff;
    --text: #333333;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    --red: #e21b3c;
    --blue: #1368ce;
    --yellow: #d89e00;
    --green: #26890c;
    --purple: #8e44ad;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    background-image: radial-gradient(circle at 20% 30%, #e5e5e5 0%, #f2f2f2 100%);
    color: var(--text);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    background: var(--glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 500px;
    width: 90%;
    margin: auto;
    transition: transform 0.3s ease;
}

h1 {
    color: var(--primary);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

input {
    display: block;
    width: 100%;
    margin: 15px 0;
    padding: 15px;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 2px solid #ddd;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary);
}

button {
    background-color: var(--primary);
    color: white;
    cursor: pointer;
    border: none;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 15px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 0 var(--primary-dark);
    transition: all 0.1s;
    margin: 10px 0;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--primary-dark);
}

button.secondary {
    background-color: var(--secondary);
    box-shadow: 0 4px 0 #a34608;
}

/* Options Grid for Mobile */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    padding: 10px;
    height: 100vh;
    width: 100%;
}

.opt-btn {
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.2);
    transition: filter 0.1s;
}

.opt-btn:active {
    filter: brightness(0.8);
    transform: scale(0.98);
}

.opt-0 {
    background-color: var(--red);
}

.opt-1 {
    background-color: var(--blue);
}

.opt-2 {
    background-color: var(--yellow);
}

.opt-3 {
    background-color: var(--green);
}

.hidden {
    display: none !important;
}

/* Host View Styles */
#room-code-display {
    font-size: 3rem;
    background: var(--white);
    padding: 1rem 2rem;
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

#status {
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeIn 0.5s ease forwards;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .container {
        padding: 1.5rem;
    }
}