/* Don't Wake Daddy - Game-Specific Styles */

/* ==================== GAME AREA ==================== */

.game-area {
    padding: 15px 0;
}

/* Game Info Bar */
.game-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.current-turn {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e8d5f5;
}

.daddy-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #c4b5d4;
    padding: 8px 16px;
    background: rgba(30, 20, 60, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.daddy-emoji {
    font-size: 1.5rem;
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.daddy-status.awake {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.5);
    color: #f8a5a5;
}

.daddy-status.awake .daddy-emoji {
    animation: shake 0.3s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* ==================== GAME BOARD ==================== */

.game-board-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 10px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-width: 600px;
    width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

/* Board space base */
.board-space {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
    min-height: 80px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: default;
}

.board-space .space-number {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.board-space .space-icon {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.board-space .space-label {
    font-size: 0.6rem;
    text-align: center;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Space types */
.board-space.type-start {
    background: linear-gradient(135deg, #2d1b69, #4a2d8c);
    border-color: #7c3aed;
}

.board-space.type-finish {
    background: linear-gradient(135deg, #065f46, #059669);
    border-color: #34d399;
    animation: finishGlow 2s ease-in-out infinite alternate;
}

@keyframes finishGlow {
    from { box-shadow: 0 0 8px rgba(52, 211, 153, 0.3); }
    to { box-shadow: 0 0 20px rgba(52, 211, 153, 0.6); }
}

.board-space.type-safe {
    background: linear-gradient(135deg, #1e2a5e, #253580);
    border-color: rgba(99, 131, 204, 0.3);
}

.board-space.type-creaky {
    background: linear-gradient(135deg, #5c4a1e, #7a6523);
    border-color: rgba(234, 179, 8, 0.5);
}

.board-space.type-squeaky {
    background: linear-gradient(135deg, #5c2a0e, #8a4417);
    border-color: rgba(249, 115, 22, 0.5);
}

.board-space.type-dropped {
    background: linear-gradient(135deg, #5c1a1a, #8a2424);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Danger indicators */
.board-space .danger-dots {
    display: flex;
    gap: 3px;
    margin-top: 2px;
}

.board-space .danger-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.board-space.type-creaky .danger-dot {
    background: #eab308;
}

.board-space.type-squeaky .danger-dot {
    background: #f97316;
}

.board-space.type-dropped .danger-dot {
    background: #ef4444;
}

/* Invisible / empty spaces for snake layout */
.board-space.empty-space {
    visibility: hidden;
}

/* Player tokens on board */
.player-tokens {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    position: absolute;
    bottom: 4px;
    right: 4px;
}

.player-token {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 2;
}

.player-token.active-token {
    animation: tokenPulse 1s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

@keyframes tokenPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Highlight current space */
.board-space.current-space {
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.5);
    transform: scale(1.03);
}

/* ==================== PLAYER PANEL ==================== */

.player-panel {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.player-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 160px;
    flex: 1;
    max-width: 220px;
    transition: all 0.3s ease;
}

.player-card.active-player {
    border-color: #a78bfa;
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.3);
}

.player-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.player-card-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.player-card-name {
    font-weight: 600;
    color: #e8d5f5;
    font-size: 0.95rem;
}

.player-card-emoji {
    margin-left: auto;
    font-size: 1.2rem;
}

.player-card-position {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.player-card-cards {
    display: flex;
    gap: 4px;
}

.excuse-card {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid;
}

.excuse-card.level-1 {
    background: rgba(234, 179, 8, 0.2);
    border-color: rgba(234, 179, 8, 0.4);
    color: #eab308;
}

.excuse-card.level-2 {
    background: rgba(249, 115, 22, 0.2);
    border-color: rgba(249, 115, 22, 0.4);
    color: #f97316;
}

.excuse-card.level-3 {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.excuse-card.used {
    opacity: 0.3;
    text-decoration: line-through;
}

/* ==================== ACTION AREA ==================== */

.action-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.spin-btn {
    font-size: 1.3rem;
    padding: 15px 40px;
    background: linear-gradient(135deg, #6c3fa0, #8b5cf6);
    border-radius: 50px;
    border: none;
    color: white;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.spin-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.spin-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.spin-result {
    font-size: 2rem;
    font-weight: 700;
    color: #a78bfa;
    min-width: 60px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 16px;
    border: 2px solid rgba(167, 139, 250, 0.3);
}

.spin-result.spinning {
    animation: spinPulse 0.15s ease-in-out infinite;
}

@keyframes spinPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ==================== GAME BUTTONS ==================== */

.game-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.game-buttons .btn {
    padding: 10px 20px;
}

/* ==================== NOISE CHECK OVERLAY ==================== */

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.noise-modal {
    background: linear-gradient(135deg, #1a1a3e, #2d1b4e);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 35px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.noise-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8a5a5;
    margin-bottom: 10px;
}

.noise-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.5;
}

.daddy-animation {
    font-size: 5rem;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.daddy-animation.sleeping {
    animation: breathe 3s ease-in-out infinite;
}

.daddy-animation.stirring {
    animation: stir 0.3s ease-in-out infinite;
}

@keyframes stir {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-5deg) scale(1.05); }
    75% { transform: rotate(5deg) scale(1.05); }
}

.daddy-animation.woke {
    animation: wokeUp 0.5s ease forwards;
}

@keyframes wokeUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1.2); }
}

.noise-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.card-btn {
    background: linear-gradient(135deg, #059669, #10b981);
    font-size: 1rem;
    padding: 12px 24px;
}

.card-btn:hover {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.press-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    font-size: 1rem;
    padding: 12px 24px;
    position: relative;
    overflow: hidden;
}

.press-btn:hover {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.press-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.press-btn:active::after {
    width: 200%;
    height: 200%;
}

.noise-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
}

.noise-result.safe {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.noise-result.woke {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* ==================== GAME OVER OVERLAY ==================== */

.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.5s ease;
}

.game-over-modal {
    background: linear-gradient(135deg, #1a1a3e, #2d1b4e);
    border: 2px solid rgba(167, 139, 250, 0.3);
    border-radius: 24px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.game-over-modal h2 {
    font-size: 2rem;
    color: #e8d5f5;
    margin-bottom: 10px;
}

.game-over-modal p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.game-over-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==================== ONLINE INFO ==================== */

.online-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.opponent-name {
    color: #c4b5d4;
    font-weight: 500;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .game-board {
        gap: 4px;
        padding: 12px;
    }

    .board-space {
        min-height: 60px;
        border-radius: 8px;
        padding: 4px;
    }

    .board-space .space-icon {
        font-size: 1rem;
    }

    .board-space .space-label {
        font-size: 0.5rem;
    }

    .board-space .space-number {
        font-size: 0.55rem;
    }

    .player-token {
        width: 18px;
        height: 18px;
        font-size: 0.5rem;
    }

    .player-card {
        min-width: 140px;
        padding: 10px 12px;
    }

    .game-info-bar {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .noise-modal {
        padding: 25px;
    }

    .daddy-animation {
        font-size: 3.5rem;
    }

    .spin-btn {
        font-size: 1.1rem;
        padding: 12px 30px;
    }
}

@media (max-width: 480px) {
    .board-space {
        min-height: 50px;
    }

    .board-space .space-icon {
        font-size: 0.85rem;
    }

    .board-space .space-label {
        display: none;
    }

    .player-panel {
        gap: 8px;
    }

    .player-card {
        min-width: 120px;
        font-size: 0.85rem;
    }
}
