:root {
    --bg-primary: #0f111a;
    --bg-secondary: #1a1d2d;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent-primary: #8b5cf6;
    /* Vibrant Purple */
    --accent-secondary: #ec4899;
    /* Neon Pink */
    --success: #10b981;
    --error: #ef4444;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);

    /* Font */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* Typography & Main Containers */
.container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 1rem;
}

.logo-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
}

.logo-title .accent {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Cards & Layout */
.action-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .action-cards {
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
    }
}

.card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    flex: 1;
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.divider {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem 0;
}

@media (min-width: 768px) {
    .divider {
        padding: 0 1rem;
        flex-direction: column;
    }
}

/* Forms & Inputs */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.host-header {
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
}

.host-header>h3 {
    margin-bottom: 2rem;
    font-size: xxx-large;
}

.room-code-display {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--accent-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.player-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.player-score {
    color: var(--accent-secondary);
}

/* Player Device Specifics */
.player-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.answer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    flex: 1;
}

.answer-btn {
    border: none;
    border-radius: 16px;
    font-size: 3rem;
    font-weight: 900;
    color: white;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.answer-btn:active {
    transform: scale(0.95);
}

.answer-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(80%);
}

.btn-a {
    background: #ef4444;
}

/* Red */
.btn-b {
    background: #3b82f6;
}

/* Blue */
.btn-c {
    background: #eab308;
}

/* Yellow */
.btn-d {
    background: #10b981;
}

/* Green */

.status-message {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 700;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

.doodle-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    justify-content: center;
}

.doodle-option input {
    display: none;
}

.doodle-emoji {
    font-size: 2rem;
    padding: 0.5rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    background: rgba(0, 0, 0, 0.2);
}

.doodle-option input:checked+.doodle-emoji {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transform: scale(1.1);
}