:root {
    --primary-color: #6C5CE7;
    --secondary-color: #A29BFE;
    --success-color: #00B894;
    --danger-color: #D63031;
    --warning-color: #FDCB6E;
    --bg-color: #DFE6E9;
    --surface-color: #FFFFFF;
    --text-color: #2D3436;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    margin-top: 0;
    color: var(--primary-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

.card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 12px; /* Increased padding */
    margin: 8px 0 20px; /* More spacing */
    border: 1px solid #ddd;
    border-radius: 8px; /* Softer corners */
    box-sizing: border-box;
    font-size: 16px;
    transition: var(--transition);
}

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

button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    width: 100%; /* Make buttons full width by default on mobile */
}

button:hover {
    background-color: #5649c0; /* Darker shade of primary */
    transform: translateY(-1px);
}

button.danger {
    background-color: var(--danger-color);
}
button.danger:hover { background-color: #b02324; }

button.success {
    background-color: var(--success-color);
}
button.success:hover { background-color: #008f72; }

button.secondary {
    background-color: #636e72;
}
button.secondary:hover { background-color: #2d3436; }

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--surface-color);
    padding: 15px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
}

.nav-links a {
    margin-left: 20px;
    font-size: 14px;
}

.role-display {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
    margin: 10px 0;
}

.role-impostor {
    background-color: rgba(214, 48, 49, 0.1);
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

.role-crewmate {
    background-color: rgba(0, 184, 148, 0.1);
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.secret-word {
    font-size: 2rem;
    color: var(--text-color);
    background: #f1f2f6;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    letter-spacing: 2px;
}

.player-list {
    list-style: none;
    padding: 0;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    background: white; /* Ensure visibility */
    transition: background-color 0.2s;
}

.player-item:last-child {
    border-bottom: none;
}
.player-item:hover {
    background-color: #f8f9fa;
}


.score-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: #b2bec3;
    font-size: 0.9em;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .nav-links a {
        margin: 0 10px;
    }
}
