/* Modern Reset & Base Variables */
:root {
    --bg-dark: #0f0f12;
    --card-dark: #16161a;
    --input-bg: #222227;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
    --radius: 14px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Card Container */
.game-card {
    background: var(--card-dark);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

header h1 {
    font-size: 1.8rem;
    color: var(--accent-red);
    text-align: center;
    letter-spacing: 2px;
    margin-top: 0;
    margin-bottom: 24px;
}

/* Screen Management */
.screen {
    display: none;
}
.screen.active {
    display: block;
}

/* Input Fields */
.input-group {
    margin-bottom: 18px;
}
label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
select {
    width: 100%;
    padding: 14px;
    background: var(--input-bg);
    border: 1px solid #2e2e38;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.primary-btn { background: var(--accent-blue); color: white; margin-top: 10px; }
.secondary-btn { background: var(--accent-green); color: white; }
.danger-btn { background: var(--accent-red); color: white; }
.btn:disabled {
    background: #2e2e35;
    color: #52525b;
    cursor: not-allowed;
}

/* Peek Interactive Pad */
.peek-pad {
    background: #1e1e24;
    border: 2px dashed #3f3f46;
    border-radius: var(--radius);
    padding: 50px 20px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin: 20px 0;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}
.peek-pad:active {
    background: #272730;
}
.secret-content {
    display: none;
    font-size: 1.8rem;
    color: var(--accent-green);
    margin-top: 8px;
}
.warning-text {
    font-size: 0.85rem;
    color: #f59e0b;
    text-align: center;
    margin-bottom: 15px;
}

/* UI Elements */
.badge {
    background: var(--accent-red);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}
.info-box {
    background: #1e1e24;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}
.highlight-text {
    font-size: 2rem;
    color: var(--accent-blue);
    font-weight: 800;
    margin: 10px 0;
}
.rules-box ul {
    text-align: left;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}
/* Custom Dialogue Box Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 18, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: #1e1e24;
    border: 2px solid #2e2e38;
    border-radius: var(--radius);
    padding: 28px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-red);
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.modal-body {
    margin-bottom: 24px;
}

.reveal-item {
    background: #16161a;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reveal-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.reveal-value-word {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-green);
}

.reveal-value-imposter {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f59e0b;
}
/* Simple Loader */
.loader {
    border: 3px solid #27272a;
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Smartphone Specific Optimizations */
@media (max-width: 480px) {
    body { padding: 10px; }
    .game-card { padding: 18px; border-radius: 12px; }
    .peek-pad { padding: 40px 15px; }
}