/* ===================== GAME COMPONENTS ===================== */

/* Title banner */
.game-title-banner {
    position: absolute;
    top: -2cqh;
    left: 0;
    right: 0;
    margin: auto;
    width: 40cqw;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(90, 60, 25, 0.35));
    animation: bannerPulse 3s ease-in-out infinite;
}

.game-header {
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    width: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.8cqh 0;
    position: absolute;
    top: 20cqh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.header-left {
    display: none !important;
}

.header-right {
    display: none !important;
}

.hud-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: var(--stone-light);
    border: 2px solid var(--gold-dark);
    border-radius: 10px;
    padding: 0.6cqh 1.4cqw;
    box-shadow: var(--shadow-inset);
}

.hud-label {
    font-size: 1.2cqmin;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.15cqh;
}

.hud-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2cqmin;
    color: var(--warm-brown-dark);
}

/* ===================== PROGRESS BAR ===================== */
.header-center {
    flex: 1.2;
    max-width: 52cqw;
    margin: 0 2.5cqw;
}

.progress-bar-container {
    display: none !important;
}

.progress-bar-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../assets/images/UI/progress bar.webp') no-repeat center center / 110% 110%;
    pointer-events: none;
    z-index: 2;
}

.progress-bar-fill {
    height: 33%;
    border-radius: 50px;
    background: url('../assets/images/UI/progressfill.webp') no-repeat left center / auto 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fillShimmer 2.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 160, 20, 0.5), 0 0 15px rgba(255, 140, 0, 0.20);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ===================== RIDDLE CARD ===================== */
.riddle-card {
    width: 70cqw;
    height: 50cqh;
    background: url('../assets/images/UI/questioncn.webp') no-repeat center center / 100% 175% !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.riddle-header {
    display: none;
}

#riddle-text {
    position: absolute;
    top: 15%;
    bottom: 15%;
    left: 20%;
    right: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 4.5cqmin;
    line-height: 1.5;
    font-weight: 700;
    color: var(--warm-brown-dark);
    font-family: var(--font-gameplay);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
    margin: 0;
    z-index: 2;
}


/* ===================== OPTIONS GRID ===================== */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2cqh 2cqw;
    width: 60cqw;
    margin: 0 auto;
    justify-content: center;
    justify-items: center;
    align-items: center;
}

.option-card {
    background: url('../assets/images/UI/option.webp') no-repeat center center / 107% 224% !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 18px !important;
    overflow: visible !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    aspect-ratio: 4.6 / 1;
    width: 100%;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.option-letter {
    display: none !important;
}

.option-text {
    position: absolute;
    left: 10%;
    right: 10%;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--font-gameplay);
    font-size: 2.7cqmin;
    font-weight: 700;
    color: var(--warm-brown-dark);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    line-height: 1.3;
    z-index: 2;
    transform: translateY(-3%);
}

.option-card:hover:not(:disabled) {
    transform: translateY(-0.2cqh) scale(1.03);
    filter: drop-shadow(0 0 12px rgba(212, 160, 23, 0.6));
}

.option-card:hover:not(:disabled) .option-letter {
    transform: scale(1.08);
}

.option-card:active:not(:disabled) {
    transform: translateY(0);
}

.option-card:disabled {
    cursor: not-allowed;
}

/* ===================== COMPANIONS ===================== */
.ganesha-container {
    display: flex !important;
    position: absolute !important;
    left: 0;
    bottom: 0;
    width: 20cqw;
    height: auto;
    z-index: 5;
    pointer-events: none;
    align-items: flex-end;
    justify-content: center;
}

.ganesha-avatar {
    width: 100%;
    height: auto;
    max-height: 55cqh;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(90, 60, 25, 0.25));
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease-in-out;
    animation: none !important;
}

#ganesha-avatar[src*="idlekiki"] {
    content: url('../assets/images/Characters/idlekiki.webp') !important;
}

#ganesha-avatar[src*="happykiki"] {
    content: url('../assets/images/Characters/happykiki.webp') !important;
}

#ganesha-avatar[src*="thoughtfulkiki"] {
    content: url('../assets/images/Characters/thoughtfulkiki.webp') !important;
}

.game-wrapper::after {
    content: '';
    display: block;
    position: absolute !important;
    right: 0;
    bottom: 0;
    width: 16cqw;
    height: 44cqh;
    z-index: 5;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
    filter: drop-shadow(0 6px 14px rgba(90, 60, 25, 0.25));
    transition: background-image 0.3s ease-in-out;
}

.game-wrapper:has(#ganesha-avatar[src*="idlekiki"])::after {
    background-image: url('../assets/images/Characters/idleemooshak.webp') !important;
}

.game-wrapper:has(#ganesha-avatar[src*="happykiki"])::after {
    background-image: url('../assets/images/Characters/happy_mooshakk.webp') !important;
}

.game-wrapper:has(#ganesha-avatar[src*="thoughtfulkiki"])::after {
    background-image: url('../assets/images/Characters/thoughtfulmooshak.webp') !important;
}

/* ===================== CONGRATS SCREEN ===================== */
.congrats-content {
    text-align: center;
}

.congrats-banner {
    position: absolute;
    top: 3cqh;
    left: 0;
    right: 0;
    margin: auto;
    width: 40cqw;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(90, 60, 25, 0.35));
    animation: bannerPulse 3s ease-in-out infinite;
}

.score-badge-circle {
    width: 37.5cqmin;
    height: 37.5cqmin;
    background: url('../assets/images/UI/scorebadge.webp') no-repeat center center / contain !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.4cqw;
    margin: 20cqh auto 0;
    position: relative;
    padding-top: 2.2cqmin;
    box-sizing: border-box;
}

.score-badge-title {
    display: none !important;
}

.score-badge-number {
    font-family: var(--font-display);
    font-size: 4.8cqmin;
    font-weight: 800;
    color: var(--warm-brown-dark);
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.score-badge-max {
    font-family: var(--font-display);
    font-size: 3.4cqmin;
    font-weight: 700;
    color: var(--gold-dark);
    line-height: 1;
}

.score-feedback {
    font-size: 1.6cqmin;
    font-weight: 600;
    color: var(--warm-brown);
}

.fireworks-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.confetti {
    position: absolute;
    width: 0.8cqw;
    height: 0.8cqw;
    background: var(--gold);
    border-radius: 50%;
    animation: confFall 3s ease-out forwards;
}

/* ===================== HANDCRAFTED TEMPLE BADGES ===================== */
.temple-score-badge,
.temple-riddle-badge {
    position: fixed;
    top: 1.5vh;
    width: auto;
    min-width: 9vw;
    background: radial-gradient(circle at 50% 120%, rgba(212, 160, 23, 0.25) 0%, transparent 80%), linear-gradient(135deg, #FFF5DF 0%, #ECD5A7 50%, #E2CCA5 100%);
    border: 3px double var(--gold);
    outline: 1px dashed rgba(212, 160, 23, 0.5);
    outline-offset: -4px;
    border-radius: 16px;
    padding: 1vh 1.5vw;
    box-shadow:
        0 6px 20px rgba(90, 60, 25, 0.18),
        0 0 15px rgba(212, 160, 23, 0.35),
        inset 0 0 10px rgba(90, 60, 25, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 500;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.temple-score-badge {
    right: calc(250px + 1.5vw);
}

.temple-riddle-badge {
    left: 1.5vw;
}

body:has(#start-screen.active) .temple-riddle-badge,
body:has(#start-screen.active) .temple-score-badge,
body:has(#congrats-screen.active) .temple-riddle-badge,
body:has(#congrats-screen.active) .temple-score-badge {
    display: none;
}

.temple-score-badge::before,
.temple-riddle-badge::before {
    content: '🪷';
    position: absolute;
    top: -12px;
    font-size: 1.8vmin;
    filter: drop-shadow(0 2px 4px rgba(90, 60, 25, 0.22)) sepia(1) saturate(5) hue-rotate(-50deg);
}

.temple-score-badge::after,
.temple-riddle-badge::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    top: 7px;
    left: 8px;
    background: radial-gradient(circle, #FF4B4B 0%, #990000 100%);
    box-shadow: 0 0 8px #FF4B4B, inset -1px -1px 2px rgba(0, 0, 0, 0.5);
}

.temple-score-gem-right {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    top: 7px;
    right: 8px;
    background: radial-gradient(circle, #4BFF4B 0%, #006600 100%);
    box-shadow: 0 0 8px #4BFF4B, inset -1px -1px 2px rgba(0, 0, 0, 0.5);
}

.temple-score-label {
    font-family: var(--font-primary);
    font-size: 1.3vmin;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
    margin-bottom: 0.2vh;
}

.temple-score-value {
    font-family: var(--font-gameplay);
    font-size: 2.8vmin;
    font-weight: 800;
    color: var(--warm-brown-dark);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
    line-height: 1.1;
    display: inline-block;
}

/* ===================== DEVELOPER MENU & LOGO ===================== */
.company-logo {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 240px;
    height: auto;
    z-index: 1000;
    pointer-events: none;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

#developer-menu {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 9999;
    font-family: sans-serif;
}
#developer-menu-toggle {
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
#developer-menu-panel {
    display: none;
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 200px;
}
#developer-menu-panel.is-visible {
    display: block;
}
.dev-menu-title {
    margin: 0 0 10px;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}
.dev-menu-group {
    margin-bottom: 15px;
}
.dev-menu-group-label {
    margin: 0 0 5px;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}
.dev-btn {
    display: block;
    width: 100%;
    padding: 8px;
    margin-bottom: 5px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
}
.dev-btn:hover {
    background: #e0e0e0;
}
.dev-btn.is-muted {
    background: #ffe0e0;
    border-color: #ffcccc;
}
.dev-scene-indicator {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-top: 5px;
}
