@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700;900&display=swap');

:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #f43f5e;
    --accent-hover: #e11d48;
    --surface: #1e293b;
    --border: #334155;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    text-align: center;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #cbd5e1;
    font-weight: 300;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #94a3b8;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.5);
}

button:active {
    transform: translateY(0);
}

button.danger {
    background: var(--accent);
    box-shadow: 0 4px 6px -1px rgba(244, 63, 94, 0.4);
}

button.danger:hover {
    background: var(--accent-hover);
    box-shadow: 0 10px 15px -3px rgba(244, 63, 94, 0.5);
}

input {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    background: #0f172a;
    border: 2px solid var(--border);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    text-align: center;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Host Specific */
.host-container {
    max-width: 900px;
}

#qrcode {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    display: inline-block;
    margin: 1rem 0 2rem 0;
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.player-badge {
    background: #1e293b;
    border: 2px solid var(--border);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-color);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

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

.secret-word-display {
    font-size: 4rem;
    font-weight: 900;
    color: var(--success);
    margin: 2rem 0;
    animation: pulsate 2s infinite;
}

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

/* Voting List */
.vote-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vote-list button {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text-color);
    box-shadow: none;
}

.vote-list button:hover {
    border-color: var(--primary);
    background: #283548;
}

/* Result Bar Chart */
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.result-row span {
    color: var(--accent);
}
