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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --success: #10b981;
    --danger: #ef4444;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.main-content {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.setup-section {
    margin-bottom: 30px;
}

.setup-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.player-card {
    background: var(--surface-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.player-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.player-name-input {
    flex: 1;
    background: var(--background);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--text-primary);
    font-size: 1rem;
    margin-right: 10px;
    transition: border-color 0.2s;
}

.player-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.remove-player-btn {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.remove-player-btn:hover {
    background: #dc2626;
}

.roles-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.role-checkbox {
    display: none;
}

.role-label {
    display: inline-block;
    padding: 10px 20px;
    background: var(--background);
    border: 2px solid var(--surface-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    user-select: none;
}

.role-checkbox:checked + .role-label {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.role-label:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.actions-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

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

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
    background: #7c3aed;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--surface-light);
}

.btn-outline:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.results-section {
    background: var(--surface-light);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 30px;
}

.results-section.hidden {
    display: none;
}

.results-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.result-card {
    background: var(--background);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-color);
}

.result-player-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-role {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--danger);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: var(--danger);
    text-align: center;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .main-content {
        padding: 20px;
    }

    .roles-selection {
        gap: 8px;
    }

    .role-label {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .actions-section {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
