/* Wordle Professional Gaming UI */
@import url('game-styles.css');

body {
    overflow: hidden !important;
}

.game-container {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.screen {
    overflow: hidden !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 15px;
}

/* Game Stats */
.game-stats {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 10px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.6em;
    font-weight: 700;
    color: #fbbf24;
}

/* Game Board */
.game-board {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 auto;
    max-width: 450px;
    flex-shrink: 0;
}

.word-row {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.letter-box {
    width: 70px;
    height: 70px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2em;
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
    transition: all 0.3s;
}

.letter-box.flip {
    animation: flip 0.5s ease;
}

@keyframes flip {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}

.letter-box.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.letter-box.correct {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

.letter-box.present {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.letter-box.absent {
    background: rgba(100, 116, 139, 0.5);
    border-color: rgba(100, 116, 139, 0.3);
}

/* Keyboard */
.keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px auto 0;
    max-width: 700px;
}

.keyboard-row {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.key {
    min-width: 50px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.key.wide {
    min-width: 80px;
    font-size: 1em;
}

.key.correct {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
}

.key.present {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
}

.key.absent {
    background: rgba(100, 116, 139, 0.5);
    border-color: rgba(100, 116, 139, 0.3);
    opacity: 0.6;
}

/* Message */
.message {
    text-align: center;
    font-size: 1.3em;
    margin: 10px 0;
    min-height: 35px;
    max-height: 35px;
    font-weight: 600;
}

.message.win {
    color: #4ade80;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.6);
}

.message.lose, .message.error {
    color: #f87171;
}

/* Responsive */
@media (max-width: 1200px) {
    .letter-box {
        width: 60px;
        height: 60px;
        font-size: 1.8em;
    }
    
    .key {
        min-width: 42px;
        height: 52px;
        font-size: 1em;
    }
    
    .key.wide {
        min-width: 70px;
    }
}

@media (max-width: 768px) {
    .letter-box {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
        gap: 6px;
    }
    
    .key {
        min-width: 36px;
        height: 48px;
        font-size: 0.9em;
        gap: 5px;
    }
    
    .key.wide {
        min-width: 60px;
    }
    
    .game-board {
        gap: 6px;
    }
    
    .word-row {
        gap: 6px;
    }
}

/* Players List */
.players-list {
    margin: 15px 0;
    text-align: left;
}

.players-list h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.player-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.player-item.ready {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

.player-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
}

.player-status {
    font-size: 0.9em;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.player-status.waiting {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.player-status.ready {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Countdown */
.countdown {
    font-size: 4em;
    font-weight: 800;
    color: #fbbf24;
    text-align: center;
    margin: 30px 0;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.6);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Co-op Game Layout */
.coop-game-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    height: calc(100vh - 150px);
    overflow: hidden;
}

/* Opponent View */
.opponent-view {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.opponent-view h3 {
    font-size: 0.9em;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.opponent-board {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.opponent-board .word-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.opponent-board .letter-box {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

.opponent-stats {
    font-size: 0.9em;
    color: #fbbf24;
    font-weight: 600;
    margin-top: 10px;
}

/* Your Game */
.your-game {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .coop-game-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .opponent-view {
        max-height: 250px;
    }
}
