.asso-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.screen.hidden {
    display: none;
}

/* Join Screen */
#join-screen {
    justify-content: center;
    align-items: center;
}

.join-header {
    text-align: center;
    margin-bottom: 40px;
}

.join-header .game-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.join-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #10b981 0%, #14532d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.join-form {
    width: 100%;
    max-width: 320px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input {
    width: 100%;
    padding: 18px 20px;
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    color: var(--light);
    text-align: center;
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.input-group input::placeholder {
    color: var(--gray);
}

.btn-join {
    width: 100%;
    padding: 18px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #10b981 0%, #14532d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-join:active {
    transform: scale(0.98);
}

.error-message {
    color: #ef4444;
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 20px;
}

/* Lobby Screen */
#lobby-screen {
    justify-content: center;
    align-items: center;
}

.waiting-content {
    text-align: center;
}

.player-card {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid #10b981;
    border-radius: 20px;
    padding: 30px 50px;
    margin-bottom: 30px;
}

.player-avatar {
    font-size: 4rem;
    margin-bottom: 15px;
}

.player-name {
    font-size: 1.8rem;
    color: var(--light);
    font-weight: bold;
}

.waiting-text {
    color: var(--gray);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.waiting-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.waiting-dots span {
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.waiting-dots span:nth-child(2) { animation-delay: 0.2s; }
.waiting-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Countdown Screen */
#countdown-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(20, 83, 45, 0.2) 100%);
}

.countdown-number {
    font-size: 10rem;
    font-weight: bold;
    color: #10b981;
    animation: pulse 1s ease infinite;
}

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

.countdown-text {
    font-size: 1.3rem;
    color: var(--gray);
}

/* Game Screen */
#game-screen {
    padding: 15px;
}

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

.round-info {
    color: var(--gray);
    font-size: 1rem;
}

.round-info span {
    color: #10b981;
    font-weight: bold;
}

.player-score {
    background: rgba(16, 185, 129, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
}

.score-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.score-value {
    color: #10b981;
    font-weight: bold;
    font-size: 1.2rem;
}

.instruction {
    text-align: center;
    color: var(--light);
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
}

.cards-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.card-btn {
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    border: 3px solid #10b981;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.card-btn:active {
    transform: scale(0.95);
}

.card-btn.selected {
    background: linear-gradient(135deg, #10b981 0%, #14532d 100%);
    border-color: #34d399;
    animation: selectedPulse 0.5s ease;
}

@keyframes selectedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.card-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.card-btn.correct {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    border-color: #22c55e;
}

.card-btn.wrong {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    border-color: #ef4444;
}

.timer-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden;
}

.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    width: 100%;
    transition: width 0.1s linear;
}

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

.timer-fill.danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Result Screen */
#result-screen {
    justify-content: center;
    align-items: center;
}

.result-content {
    text-align: center;
    animation: resultBounce 0.5s ease;
}

@keyframes resultBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.result-icon {
    font-size: 6rem;
    margin-bottom: 20px;
}

.result-icon.correct {
    color: #22c55e;
}

.result-icon.wrong {
    color: #ef4444;
}

.result-text {
    font-size: 1.5rem;
    color: var(--light);
    margin-bottom: 15px;
}

.points-earned {
    font-size: 2.5rem;
    font-weight: bold;
    color: #10b981;
}

.points-earned.negative {
    color: #ef4444;
}

/* Final Screen */
#final-screen {
    justify-content: center;
    align-items: center;
}

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

.final-trophy {
    font-size: 6rem;
    margin-bottom: 20px;
}

.final-trophy.first {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.final-position {
    font-size: 4rem;
    font-weight: bold;
    color: #10b981;
}

.final-position.first { color: #f59e0b; }
.final-position.second { color: #94a3b8; }
.final-position.third { color: #b45309; }

.final-score {
    font-size: 1.5rem;
    color: var(--gray);
    margin: 20px 0 30px;
}

.btn-play-again {
    padding: 18px 50px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #10b981 0%, #14532d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
}

.btn-play-again:active {
    transform: scale(0.98);
}
