/* ========================================
   COUPLE GAMES - Active Game & Video UI
   ======================================== */

/* Make the container wider when in game mode */
body.game-active .couple-container {
    max-width: 1200px;
    transition: max-width 0.5s ease;
}

/* --- Game Header & Prompts --- */
.game-header-area {
    text-align: center;
    margin-bottom: 1.5rem;
}

.game-header-area h3 {
    font-family: 'Playfair Display', serif;
    color: var(--couple-gold);
    margin: 0 0 1rem 0;
}

/* --- Scoreboard & Timer --- */
.couple-scoreboard {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(225, 29, 72, 0.3);
    backdrop-filter: blur(10px);
}

.score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.score-name {
    font-size: 0.8rem;
    color: var(--couple-pink);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(225, 29, 72, 0.8);
}

.score-divider {
    font-size: 1.5rem;
    animation: heartbeat 1.5s infinite;
}

.couple-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--couple-gold);
    margin: 0 0 1rem 0;
    background: rgba(40, 5, 15, 0.8);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    border: 1px solid var(--couple-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.prompt-card {
    background: rgba(225, 29, 72, 0.1);
    border: 1px solid rgba(225, 29, 72, 0.5);
    border-radius: 15px;
    padding: 1.5rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    min-width: 250px;
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.3);
    animation: pulseRomantic 2s infinite;
}

@keyframes pulseRomantic {
    0% {
        box-shadow: 0 0 15px rgba(225, 29, 72, 0.2);
    }

    50% {
        box-shadow: 0 0 25px rgba(225, 29, 72, 0.6);
    }

    100% {
        box-shadow: 0 0 15px rgba(225, 29, 72, 0.2);
    }
}

.prompt-label {
    display: block;
    font-size: 0.8rem;
    color: #fecdd3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.romantic-word {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    margin: 0;
    color: #fff;
    text-shadow: 0 0 10px rgba(225, 29, 72, 0.8);
    text-align: center;
}

.prompt-category {
    font-size: 0.75rem;
    background: var(--couple-dark-red);
    padding: 4px 12px;
    border-radius: 15px;
    color: #fff;
    font-weight: bold;
    letter-spacing: 1px;
}

#skipWordBtn {
    margin-top: 0.5rem !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    padding: 0.4rem 1rem !important;
    transition: all 0.3s ease;
}

#skipWordBtn:hover {
    background: rgba(225, 29, 72, 0.3) !important;
    border-color: rgba(225, 29, 72, 0.6) !important;
}

/* --- Video Grid (PiP Style for 2 players) --- */
.couple-video-grid {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(225, 29, 72, 0.3);
}

/* Remote Video (Full Size) */
.remote-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.remote-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Local Video (Floating Picture-in-Picture) */
.local-wrapper {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 25%;
    max-width: 180px;
    aspect-ratio: 16/9;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid var(--couple-pink);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
    z-index: 10;
    transition: transform 0.3s ease;
}

.local-wrapper:hover {
    transform: scale(1.05);
}

.local-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    /* Mirror self */
}

/* Video Labels */
.video-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* --- Interaction Area (Guessing) --- */
.interaction-area {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.guess-input-group {
    display: flex;
    width: 100%;
    max-width: 500px;
    gap: 0.5rem;
}

.guess-input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(225, 29, 72, 0.5);
    color: white;
    padding: 1rem;
    border-radius: 50px;
    font-size: 1rem;
}

.guess-input-group input:focus {
    outline: none;
    border-color: var(--couple-pink);
    box-shadow: 0 0 15px rgba(225, 29, 72, 0.4);
}

.guess-input-group .btn-romantic {
    width: auto;
    padding: 0 2rem;
    font-size: 1rem;
    margin: 0;
}

/* --- Media Controls Bar --- */
.media-controls-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.media-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.media-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.media-btn.muted {
    background: rgba(255, 0, 0, 0.6);
    position: relative;
}

.media-btn.muted::after {
    content: '/';
    position: absolute;
    color: white;
    font-weight: bold;
    font-size: 2rem;
}

.media-btn.end-call {
    background: var(--couple-red);
}

.media-btn.end-call:hover {
    background: #ff0033;
    box-shadow: 0 0 15px red;
}

/* --- Hint Boxes Container (Phase 4) --- */
.hint-boxes-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.hint-box {
    width: 2.5rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--couple-light);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--couple-gold);
    border-radius: 8px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
}

.hint-box.revealed {
    background: rgba(255, 0, 51, 0.2);
    border-color: #ff0033;
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.5);
    color: #fff;
    transform: scale(1.1);
}

/* --- Couple Chat Sidebar (Phase 5) --- */
.game-layout-wrapper {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    width: 100%;
}

.game-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.couple-chat-sidebar {
    width: 320px;
    background: rgba(40, 5, 15, 0.7);
    border-radius: 20px;
    border: 1px solid rgba(225, 29, 72, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.chat-header {
    background: rgba(225, 29, 72, 0.2);
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(225, 29, 72, 0.3);
}

.chat-header h3 {
    margin: 0;
    color: var(--couple-pink);
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    scrollbar-width: thin;
    scrollbar-color: var(--couple-pink) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--couple-pink);
    border-radius: 10px;
}

.chat-sys-msg {
    text-align: center;
    font-size: 0.8rem;
    color: #ff99aa;
    font-style: italic;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 10px;
}

.chat-msg {
    max-width: 85%;
    padding: 0.6rem 1rem;
    border-radius: 15px;
    font-size: 0.95rem;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

.chat-msg.me {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--couple-red), var(--couple-dark-red));
    border-bottom-right-radius: 5px;
    color: white;
}

.chat-msg.partner {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-left-radius: 5px;
    color: var(--couple-light);
}

.chat-msg-sender {
    font-size: 0.7rem;
    margin-bottom: 2px;
    opacity: 0.8;
}

.chat-input-area {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(225, 29, 72, 0.3);
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: white;
    font-size: 0.9rem;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--couple-pink);
}

.chat-send-btn {
    background: var(--couple-red);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0 1rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    background: var(--couple-pink);
}

/* Responsive Tweaks */
@media (max-width: 900px) {
    .game-layout-wrapper {
        flex-direction: column;
    }

    .couple-chat-sidebar {
        width: 100%;
        height: 300px;
        margin-top: 1.5rem;
    }
}

@media (max-width: 600px) {
    body.game-active .panel-glass {
        padding: 1rem;
        border-radius: 0;
        border: none;
        border-top: 1px solid rgba(225, 29, 72, 0.3);
    }

    body.game-active .couple-container {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .hint-box {
        width: 2rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }
}