* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--primary-text-color, white);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #a0aec0;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, #f5576c 0%, #e74c3c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.btn-back {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    font-size: 1em;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-large {
    width: 100%;
    padding: 20px;
    font-size: 1.3em;
}

.btn-icon {
    font-size: 1.3em;
}

.button-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* Game Cards */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.game-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.game-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: white;
}

.game-card p {
    color: #a0aec0;
    margin-bottom: 15px;
    line-height: 1.6;
}

.player-count {
    display: inline-block;
    background: rgba(102, 126, 234, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #b794f4;
    font-weight: 600;
}

/* Info Box */
.info-box {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-top: 40px;
}

.info-box h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: white;
}

.info-box ol {
    list-style: none;
    counter-reset: step-counter;
}

.info-box li {
    counter-increment: step-counter;
    margin-bottom: 15px;
    padding-left: 40px;
    position: relative;
    color: #a0aec0;
    line-height: 1.6;
}

.info-box li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: -2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9em;
}

.info-box strong {
    color: white;
}

/* Room Setup */
.room-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.room-header h2 {
    font-size: 2.5em;
    color: white;
}

.room-setup {
    max-width: 500px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #a0aec0;
}

.input-group input {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.code-input {
    text-transform: uppercase;
    text-align: center;
    font-size: 2em !important;
    letter-spacing: 10px;
    font-weight: 700;
}

/* Room Code Display */
.room-code-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

.room-code-label {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.9;
}

.room-code {
    font-size: 5em;
    font-weight: 900;
    letter-spacing: 15px;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.room-code-instructions {
    font-size: 1.1em;
    opacity: 0.9;
}

.room-code-instructions strong {
    font-weight: 700;
}

/* Player List */
.player-list-container {
    margin-bottom: 40px;
}

.player-list-container h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: white;
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.player-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.player-badge:hover {
    transform: scale(1.05);
    border-color: rgba(102, 126, 234, 0.5);
}

.player-avatar {
    font-size: 2.5em;
    margin-bottom: 8px;
}

.player-name {
    font-weight: 600;
    color: white;
}

.player-host-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    margin-top: 5px;
}

/* Game Selection */
.game-selection {
    margin-bottom: 40px;
}

.game-selection h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: white;
    text-align: center;
}

.game-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.game-select-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px 20px;
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.game-select-btn:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 126, 234, 0.8);
    background: rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.game-select-btn .game-icon {
    font-size: 3em;
    margin-bottom: 0;
}

/* Waiting Room */
.waiting-room {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.success-message {
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
}

.check-icon {
    font-size: 4em;
    color: #48bb78;
    margin-bottom: 15px;
}

.success-message h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: white;
}

.success-message p {
    font-size: 1.2em;
    color: #a0aec0;
}

.room-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-around;
    font-size: 1.1em;
    color: #a0aec0;
}

.room-info strong {
    color: white;
    font-size: 1.3em;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .room-code {
        font-size: 3.5em;
        letter-spacing: 8px;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
