/* WORD GUESS SPECIFIC STYLES */

.game-viewport {
    background: #0a0a1a;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#game-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

/* HUD */
#hud-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.hud-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.clue-box {
    flex-grow: 1;
    background: rgba(59, 130, 246, 0.1);
    padding: 5px;
    border-radius: 8px;
    border: 1px dashed rgba(59, 130, 246, 0.4);
    margin: 0 15px;
}

.hud-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

#streak-display, #tries-display {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.highlight-text {
    color: #10b981 !important;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Toast Notifications */
#toast-container {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 200;
}

.toast {
    background: #fff;
    color: #000;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 10px;
    opacity: 1;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.toast.fade-out {
    opacity: 0;
}

/* Board Grid */
#grid-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    margin-bottom: 20px;
    width: 100%;
}

#board {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    width: 100%;
    max-width: 330px;
    padding: 10px;
}

.tile {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #334155;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    box-sizing: border-box;
    border-radius: 4px;
}

.tile[data-state="active"] {
    border-color: #94a3b8;
    animation: pop 0.1s ease-in-out;
}

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

/* Tile Flipping Animation */
.tile.flip {
    animation: flipIn 0.5s ease-in forwards;
}

@keyframes flipIn {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(-90deg); }
    100% { transform: rotateX(0); }
}

/* Tile Status Colors */
.tile[data-status="correct"] {
    background-color: #10b981;
    border-color: #10b981;
}

.tile[data-status="present"] {
    background-color: #eab308;
    border-color: #eab308;
}

.tile[data-status="absent"] {
    background-color: #334155;
    border-color: #334155;
}

/* Overlay */
.overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 16px;
    transition: opacity 0.3s ease;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-width: 90%;
    width: 320px;
}

.overlay-content h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.overlay-content p {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
}

.stat-lbl {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
}

.primary-btn {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Outfit', sans-serif;
    width: 100%;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .game-viewport {
        padding: 10px;
    }
    
    #board {
        gap: 5px;
        max-width: 280px;
    }
    
    .tile {
        font-size: 1.6rem;
    }
    
    #hud-top {
        margin-bottom: 10px;
        padding: 8px 15px;
    }
}

/* For very small devices */
@media (max-width: 360px) {
    #board {
        max-width: 250px;
    }
}
