/**
 * Eponym Challenge - 3D Academic Theme
 */

:root {
    --aca-blue: #1a4d8c;
    --aca-blue-dark: #0b1f2d;
    --aca-cream: #fdfbf7;
    --aca-gold: #c5a059;
    --aca-success: #27ae60;
    --aca-danger: #e74c3c;
    --glass: rgba(255, 255, 255, 0.05);
}

/* 3D Theater Layout */
.eponyms-3d-theater {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background: radial-gradient(circle at center, #1a2a3a 0%, #050a0f 100%);
    color: var(--aca-cream);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 1200px;
}

.theater-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(15, 45, 60, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.aca-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.aca-logo .icon {
    font-size: 2.2rem;
}

.aca-logo h1 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.aca-logo p {
    margin: 0;
    font-size: 0.7rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.theater-stats {
    display: flex;
    gap: 30px;
}

.theater-stats .stat {
    text-align: right;
}

.theater-stats .val {
    display: block;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--aca-gold);
}

.theater-stats .lbl {
    font-size: 0.65rem;
    opacity: 0.5;
    letter-spacing: 1px;
}

/* 3D Grid */
.theater-stage {
    padding: 50px 40px;
}

.eponyms-3d-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 40px;
    transform-style: preserve-3d;
}

/* 3D Interactive Card */
.eponym-3d-card {
    height: 320px;
    cursor: pointer;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.eponym-3d-card:hover {
    transform: translateZ(40px) rotateX(10deg) rotateY(10deg);
}

.card-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 77, 140, 0.2) 0%, rgba(15, 45, 60, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.entry-number {
    position: absolute;
    top: 25px;
    left: 25px;
    font-size: 1.8rem;
    font-weight: 900;
    opacity: 0.2;
}

.aca-seal {
    font-size: 5rem;
    opacity: 0.05;
}

.card-label {
    position: absolute;
    bottom: 35px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--aca-gold);
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.3);
}

/* Challenge Overlay */
.challenge-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 15, 0.98);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(30px);
}

.overlay-content {
    max-width: 900px;
    width: 90%;
    text-align: center;
}

.timer-3d {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 40px;
}

.timer-svg {
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 10;
}

.timer-fill {
    fill: none;
    stroke: var(--aca-blue);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-3d.danger .timer-fill {
    stroke: var(--aca-danger);
}

#timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 900;
}

.name-reveal-box h2 {
    font-size: 4.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 40px rgba(26, 77, 140, 0.6);
}

.options-3d {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.option-3d-btn {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 12px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.option-3d-btn:hover:not(:disabled) {
    background: rgba(26, 77, 140, 0.3);
    border-color: var(--aca-blue);
    transform: translateY(-8px) translateZ(20px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.option-3d-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-box {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px;
    border-radius: 24px;
}

#result-emoji {
    font-size: 6rem;
    margin-bottom: 30px;
}

#result-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.aca-explanation {
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 16px;
    line-height: 1.9;
    font-size: 1.1rem;
}

.aca-explanation strong {
    color: var(--aca-gold);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .options-3d {
        grid-template-columns: 1fr;
    }

    .name-reveal-box h2 {
        font-size: 2.5rem;
    }

    .theater-header {
        padding: 15px 20px;
    }
}