/* assets/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --primary: #6C5CE7;
  --primary-hover: #5A4FCF;
  --secondary: #00CEC9;
  --bg: #0F0C29;
  --bg-gradient: linear-gradient(135deg, #0F0C29, #302B63, #24243E);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-border: rgba(255, 255, 255, 0.1);
  --text: #FFFFFF;
  --text-muted: #A0A0B0;
  --success: #00B894;
  --danger: #D63031;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-container {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

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

.header-text {
    text-align: center;
    margin-bottom: 2rem;
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(to right, #00CEC9, #6C5CE7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-text p {
    color: var(--text-muted);
    margin: 0;
    font-size: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-field {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--surface-border);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.input-field option {
    background: var(--bg);
}

.btn {
    padding: 1.1rem;
    border-radius: 12px;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary), #8E2DE2);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
}

.error-msg {
    color: var(--danger);
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.2rem;
}

/* Room specific UI */
.top-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.room-pill, .score-pill {
    background: rgba(0,0,0,0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--secondary);
}

/* Waiting Lobby */
.player-list {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.player-item {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.player-item:last-child { border: none; }
.admin-badge {
    background: var(--primary);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: 10px;
}

/* Game UI */
.timer-radial {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin: 1rem 0;
    color: var(--secondary);
    text-shadow: 0 0 20px rgba(0, 206, 201, 0.5);
}

.question-text {
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.answer-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--surface-border);
    padding: 1.5rem 1rem;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.answer-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.answer-btn.selected {
    background: var(--primary);
    border-color: var(--primary-hover);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
}

.answer-btn.correct {
    background: var(--success) !important;
    border-color: #00F000;
    color: white;
}

.answer-btn.wrong {
    background: var(--danger) !important;
    border-color: #F00000;
}

@media (max-width: 600px) {
    .answers-grid {
        grid-template-columns: 1fr;
    }
}

.result-banner {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
}
.result-correct { background: rgba(0, 184, 148, 0.2); color: var(--success); }
.result-wrong { background: rgba(214, 48, 49, 0.2); color: var(--danger); }
.result-none { background: rgba(255, 255, 255, 0.1); color: white; }

.loader {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}
