.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.back-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.player-info {
    background: rgba(255, 215, 0, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
}

.timer-display {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 10px;
    display: none;
}

.timer-display.warning {
    color: var(--red);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.lobby-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.lobby-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 50px;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lobby-options {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.lobby-card {
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    width: 300px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.lobby-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
}

.lobby-card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.lobby-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.lobby-card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.room-code-display {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 10px;
    color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.room-code-input {
    width: 100%;
    padding: 15px;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 5px;
    text-transform: uppercase;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: 20px;
}

.room-code-input::placeholder {
    letter-spacing: normal;
    text-transform: none;
}

.waiting-text {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.waiting-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.scores-panel {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.player-score {
    text-align: center;
    padding: 20px 40px;
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 15px;
}

.player-score.you {
    border: 2px solid var(--accent-gold);
}

.player-score.opponent {
    border: 2px solid var(--blue);
}

.player-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.player-score-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.player-score.you .player-score-value {
    color: var(--accent-gold);
}

.player-score.opponent .player-score-value {
    color: var(--blue);
}

.round-info {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.round-info span {
    color: var(--accent-gold);
    font-weight: 700;
}

.teacher-card {
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.photo-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-gold);
    margin-bottom: 20px;
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info {
    text-align: center;
}

.info h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.university {
    color: var(--text-secondary);
    font-size: 1rem;
}

.guess-form {
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 20px;
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.rating-slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rating-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--red), var(--accent-gold), var(--green));
    outline: none;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.rating-slider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
}

.rating-value-display {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-gold);
    min-width: 80px;
    text-align: center;
}

.department-select {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
}

.department-select option {
    background: #2a2a4a;
    color: white;
}

.submit-btn {
    width: 100%;
    padding: 20px;
    font-size: 1.3rem;
}

.waiting-opponent {
    text-align: center;
    padding: 40px;
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 20px;
    display: none;
}

.waiting-opponent.show {
    display: block;
}

.waiting-opponent h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.round-result {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.round-result.show {
    display: flex;
}

.round-result-content {
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.round-result-title {
    font-size: 2rem;
    margin-bottom: 30px;
}

.round-scores {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.round-player-score {
    text-align: center;
}

.round-player-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.round-player-value {
    font-size: 2rem;
    font-weight: 800;
}

.actual-answer {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.actual-answer p {
    margin-bottom: 10px;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 300;
}

.game-over.show {
    display: flex;
}

.game-over h1 {
    font-size: 3rem;
    margin-bottom: 30px;
}

.game-over h1.win {
    color: var(--green);
}

.game-over h1.lose {
    color: var(--red);
}

.game-over h1.draw {
    color: var(--accent-gold);
}

.final-scores {
    display: flex;
    gap: 50px;
    margin-bottom: 40px;
}

.final-player {
    text-align: center;
}

.final-player-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.final-player-value {
    font-size: 3rem;
    font-weight: 800;
}

.game-over-buttons {
    display: flex;
    gap: 20px;
}

@media (max-width: 700px) {
    .lobby-options {
        flex-direction: column;
    }
    
    .lobby-card {
        width: 100%;
    }
    
    .scores-panel {
        flex-direction: column;
        gap: 15px;
    }
    
    .player-score {
        padding: 15px;
    }
}

/* Multiplayer menu styles */
.multiplayer-container {
    min-height: 100vh;
    padding: 20px;
}

.multiplayer-container .header {
    text-align: center;
    margin-bottom: 30px;
}

.multiplayer-container h1 {
    color: var(--accent-gold);
    font-size: 2rem;
}

.multiplayer-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.option-card {
    background: linear-gradient(145deg, var(--bg-card), #1e1e3a);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.option-card h2 {
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.option-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.option-card input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 2px;
}

.option-card input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.error-message {
    display: none;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.5);
    color: #ff6b6b;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
}

/* HP Bars */
.hp-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
}

.hp-bar-wrapper {
    flex: 1;
    max-width: 250px;
}

.hp-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #4ade80;
}

.hp-bar-wrapper.opponent .hp-label {
    color: #f87171;
    text-align: right;
}

.hp-bar {
    height: 24px;
    background: rgba(0,0,0,0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.hp-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.hp-fill.critical {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hp-bar-wrapper.opponent .hp-fill {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.hp-text {
    font-size: 16px;
    font-weight: 800;
    margin-top: 5px;
    color: #4ade80;
}

.hp-bar-wrapper.opponent .hp-text {
    color: #f87171;
    text-align: right;
}

.vs-divider {
    font-size: 32px;
}

/* Result styles */
.round-result-title.win { color: #4ade80; }
.round-result-title.lose { color: #f87171; }
.round-result-title.draw { color: #fbbf24; }

.guesses-comparison {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 20px 0;
}

.guess-item {
    text-align: center;
    padding: 15px 25px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
}

.guess-item.you {
    border: 2px solid #4ade80;
}

.guess-item.opponent {
    border: 2px solid #f87171;
}

.guess-label {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.guess-value {
    font-size: 28px;
    font-weight: 800;
}

.damage {
    font-size: 18px;
    font-weight: 600;
    margin-top: 5px;
    color: #f87171;
}

.final-hp {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin: 30px 0;
}
