:root {
    --primary-color: #2c3e50;
    --primary-hover: #34495e;
    --background-color: #f5f6fa;
    --card-background: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 24px;
    margin: 0 0 32px 0;
    border-radius: var(--border-radius);
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.025em;
    box-shadow: var(--shadow-md);
}

h2 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 24px;
}

h3 {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 24px;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    background-color: var(--card-background);
    margin-bottom: 16px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px auto;
    transition: var(--transition);
}

select:hover {
    border-color: var(--primary-color);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

button:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.button-fixed {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(0);
    width: calc(100% - 48px);
    max-width: 300px;
    z-index: 10;
}

.button-fixed:hover {
    transform: translateX(-50%) translateY(-1px);
}

.hidden {
    display: none;
}

/* Role Screen Styles */
#player-role {
    background-color: var(--card-background);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin: 24px 0;
    text-align: center;
}

.role-emoji {
    font-size: 4rem;
    margin-bottom: 16px;
}

#spy-role {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 24px;
    border-radius: var(--border-radius);
    margin-top: 16px;
    text-align: center;
}

#spy-role .shushing-icon {
    font-size: 2rem;
    margin-top: 8px;
}

#secret-word {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 16px;
    text-align: center;
}

/* Gameplay Screen Styles */
#gameplay-screen {
    background-color: var(--card-background);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.category-label {
    display: inline-block;
    background-color: #e0e7ff;
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    margin: 16px 0;
}

#discussion-questions {
    margin-top: 24px;
}

#questions-list {
    list-style-type: none;
    padding: 0;
}

#questions-list li {
    background-color: #f8fafc;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

/* Endgame Screen Styles */
#endgame-screen {
    text-align: center;
}

#endgame-info {
    background-color: var(--card-background);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin: 24px 0;
}

#endgame-info h3 {
    color: var(--primary-color);
    margin-top: 0;
}

#endgame-info p {
    margin: 16px 0;
    font-size: 1.125rem;
}

#endgame-info strong {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        padding: 16px;
    }
    
    h1 {
        font-size: 1.5rem;
        padding: 20px;
    }
    
    #player-role {
        padding: 24px;
    }
    
    #questions-list li {
        padding: 12px;
    }
}

.welcome-section {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.game-intro {
    font-size: 1.2rem;
    line-height: 1.5;
    margin: 0;
    color: #333;
}

.game-setup {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.game-setup h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.setup-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.form-group label {
    font-weight: 600;
    color: #444;
}

.form-group select {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-group select:hover {
    border-color: #bbb;
}

.form-group select:focus {
    border-color: #666;
    outline: none;
}

.hint {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.button-fixed {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.button-fixed:hover {
    background-color: #0056b3;
}