/* Higher or Lower Game Styling */

#higher-or-lower-game-view {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    gap: 16px;
    color: #f8fafc;
    position: relative;
    user-select: none;
}

/* Header bar */
.hol-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    flex-wrap: wrap;
    gap: 12px;
}

.hol-prompt-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hol-prompt-area h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hol-round-counter {
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hol-stats-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hol-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #f1f5f9;
}

.hol-stat-badge.eliminated {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

/* Timer SVG container */
#hol-timer-container {
    width: 44px;
    height: 44px;
    position: relative;
}

#hol-timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-background {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.2s linear, stroke 0.3s ease;
}

#hol-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
}

#hol-timer-text.timer-warning {
    color: #ef4444;
    animation: hol-pulse 0.6s infinite alternate;
}

/* Split-screen Arena */
.hol-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: stretch;
    position: relative;
    min-height: 440px;
}

/* Item Comparison Cards */
.hol-card {
    position: relative;
    height: 100%;
    min-height: 440px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.14);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, filter 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    background-color: #0f172a;
}

.hol-card.clickable:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 20px rgba(56, 189, 248, 0.25);
}

.hol-card.selected-card {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.5), 0 20px 48px rgba(0, 0, 0, 0.6) !important;
    transform: translateY(-4px);
}

.hol-card.winner-card {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.6), 0 0 36px rgba(16, 185, 129, 0.5) !important;
    transform: scale(1.02);
    z-index: 3;
}

.hol-card.loser-card {
    border-color: rgba(255, 255, 255, 0.08) !important;
    opacity: 0.5;
    filter: grayscale(0.65);
    transform: scale(0.98);
}

.hol-card.disabled-interaction {
    cursor: default;
    pointer-events: none;
}

.hol-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.6s ease;
}

.hol-card-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.25) 0%, rgba(15, 23, 42, 0.82) 55%, rgba(15, 23, 42, 0.97) 100%);
}

.hol-card.clickable:hover .hol-card-bg {
    transform: scale(1.04);
}

.hol-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    align-items: center;
}

.hol-card-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    margin: 0;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hol-card-value-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 4px 0 8px;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 280px;
}

.hol-value-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 700;
}

.hol-card-value {
    font-size: 2.6rem;
    font-weight: 900;
    color: #facc15;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 14px rgba(250, 204, 21, 0.4);
    font-variant-numeric: tabular-nums;
}

.hol-card-left .hol-card-value {
    color: #38bdf8;
    text-shadow: 0 2px 14px rgba(56, 189, 248, 0.4);
}

.hol-card-action-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.hol-card.clickable:hover .hol-card-action-badge {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    color: #38bdf8;
    transform: scale(1.05);
}

.hol-card.selected-card .hol-card-action-badge {
    background: #38bdf8;
    border-color: #38bdf8;
    color: #0f172a;
}

.hol-card.winner-card .hol-card-action-badge {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

/* VS Badge */
.hol-vs-badge {
    z-index: 5;
    background: #0f172a;
    border: 3px solid #facc15;
    color: #facc15;
    font-size: 1.3rem;
    font-weight: 900;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 24px rgba(250, 204, 21, 0.35);
    animation: hol-pulse 2s infinite alternate;
    align-self: center;
}

/* Higher / Lower Guess Buttons */
.hol-guess-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 260px;
    margin-top: 8px;
}

.hol-btn-guess {
    padding: 12px 20px;
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.hol-btn-higher {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.hol-btn-higher:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.hol-btn-lower {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.hol-btn-lower:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.hol-btn-guess:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.hol-btn-guess.selected-guess {
    border-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4);
    opacity: 1 !important;
}

.hol-btn-guess.correct {
    background: #10b981 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.6) !important;
}

.hol-btn-guess.wrong {
    background: #475569 !important;
    opacity: 0.4 !important;
    text-decoration: line-through;
}

/* Reveal Overlay */
.hol-reveal-overlay {
    position: relative;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    animation: hol-slide-up 0.3s ease;
}

.hol-reveal-summary {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.hol-reveal-comp strong {
    color: #38bdf8;
}

.hol-controls-area {
    display: flex;
    gap: 12px;
}

/* Animations */
@keyframes hol-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

@keyframes hol-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hol-arena {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hol-vs-badge {
        margin: -8px auto;
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .hol-card {
        min-height: 280px;
        padding: 16px;
    }

    .hol-card-title {
        font-size: 1.25rem;
    }

    .hol-card-value {
        font-size: 1.8rem;
    }
}
