/* :root {
    --bg-primary: #ffffff;
    --text-primary: #271111;
    --text-secondary: #634b4b;
    --accent: #eb2525;
    --accent-hover: #d81d1d;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --border-colour: #ebe5e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
} */

/* --- Global Base / Theme Styling --- */
:root {
    --bg-primary: #121214;
    --bg-surface: #1e1e24;
    --bg-card: #2a2a32;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --color-primary: #6366f1; /* Indigo */
    --color-primary-hover: #4f46e5;
    --color-danger: #ef4444; /* Crimson */
    --color-danger-hover: #dc2626;
    --radius-lg: 12px;
    --radius-md: 8px;
    --transition: all 0.2s ease-in-out;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

main {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    box-sizing: border-box;
}

/* --- Container Style --- */
.setup-container {
    background-color: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.setup-container h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.8rem;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* --- Player Input Cards --- */
#player-list {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Gap between player rows */
    margin-bottom: 24px;
}

.player-card {
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

/* Soft highlight on active input focus */
.player-card:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.player-number {
    font-weight: bold;
    color: var(--color-primary);
    margin-right: 16px;
    min-width: 24px;
}

.player-name-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 1rem;
    padding: 4px 0;
}

.player-name-input::placeholder {
    color: var(--text-muted);
}

.remove-player-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: var(--transition);
}

.remove-player-btn:hover {
    color: var(--color-danger);
}

/* --- Action Buttons --- */
.setup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

button.primary-btn, 
button.secondary-btn {
    font-size: 1rem;
    font-weight: 600;
    padding: 14px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.primary-btn {
    background-color: var(--color-primary);
    color: white;
}

.primary-btn:hover {
    background-color: var(--color-primary-hover);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-main);
    border: 2px dashed rgba(255, 255, 255, 0.15) !important;
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* --- Mobile Responsiveness --- */
@media (min-width: 480px) {
    .setup-actions {
        flex-direction: row;
        justify-content: space-between;
    }
    .primary-btn {
        flex-grow: 2;
    }
    .secondary-btn {
        flex-grow: 1;
    }
}

/* --- Category Selection Layout --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 16px;
    margin-bottom: 24px;
}

.category-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.category-icon {
    font-size: 2rem;
}

.category-name {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
}

/* Category Hover & Selection states */
.category-card:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.category-card.active {
    border-color: var(--color-primary);
    background-color: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Disabled styling for the start button */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--text-muted);
}



/* --- Imposter Stepper Wrapper --- */
.imposter-count-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.imposter-count-selector label {
    font-weight: 600;
    font-size: 1rem;
}

.stepper-control {
    display: flex;
    align-items: center;
    gap: 16px;
}

.step-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-size: 1rem;
    font-weight: bold;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.step-btn:hover:not(:disabled) {
    background-color: var(--color-primary);
    border-color: var(--color-primary-hover);
}

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

#imposter-count-display {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* --- Secret Word Reveal Elements Layout --- */
.reveal-card {
    background-color: var(--bg-card);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 24px;
    margin: 20px 0;
    transition: var(--transition);
}

.reveal-card.hidden-state:hover {
    background-color: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.3);
}

.reveal-card.revealed-state {
    border-style: solid;
    background-color: rgba(0, 0, 0, 0.2);
}

.card-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.card-icon {
    font-size: 3rem;
}

#role-tag {
    font-size: 1.4rem;
    letter-spacing: 2px;
    font-weight: 800;
    margin-bottom: 0;
}

.role-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

#secret-word-display {
    font-size: 2.2rem;
    margin-top: 4px;
    font-weight: 700;
}

/* --- Game Over Dashboard Details --- */
.word-reveal-box {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: var(--radius-md);
}

.result-row {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.result-name {
    flex: 1;
    text-align: left;
}

.result-badge {
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-right: 16px;
}

.result-word {
    color: var(--text-muted);
    font-style: italic;
    min-width: 100px;
    text-align: right;
}