* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    background-image: url("../Designer (2).png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-color: #fffaf8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

.game-wrapper {
    max-width: 1000px;
    width: 100%;
    background: #fffaf8;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.while_wait {
    font-size: 18px;
    font-weight: bold;
    color: #723b47;
    text-align: center;
    margin-bottom: 16px;
}
.game-title {
    font-size: 22px;
    font-weight: bold;
    color: #723b47;
}

.game-stats {
    display: flex;
    gap: 20px;
    font-weight: bold;
    color: #723b47;
}

.target-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.target-section p {
    font-weight: bold;
    color: #444;
}

#targetCanvas {
    border: 3px solid #723b47;
    border-radius: 10px;
    background: #f4f4f4;
}

.scene-wrap {
    position: relative;
    width: 100%;
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.scene-wrap img {
    display: block;
    width: 100%;
    height: auto;
}

.hotspots {
    position: absolute;
    inset: 0;
}

.hotspot {
    position: absolute;
    width: 5%;
    height: 8%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    cursor: pointer;
}

.hotspot.wrong-flash {
    animation: flash-red 0.3s ease-in-out;
}

@keyframes flash-red {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 4px rgba(220, 50, 50, 0.6); }
}

.message {
    text-align: center;
    margin-top: 14px;
    font-size: 18px;
    font-weight: bold;
    min-height: 26px;
}

.controls {
    text-align: center;
    margin-bottom: 14px;
}

.controls button,
.name-entry button {
    background: #723b47;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.controls button:hover,
.name-entry button:hover {
    background: #723b47;
}

.controls button:disabled {
    background: #83676d;
    cursor: default;
}

.scene-wrap.inactive .hotspots {
    pointer-events: none;
}

.name-entry {
    margin-top: 16px;
    padding: 16px;
    border: 2px solid #723b47;
    border-radius: 10px;
    background: #f4faf6;
    text-align: center;
}

.name-entry form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.name-entry input {
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
}

.leaderboard {
    max-width: 1000px;
    width: 100%;
    background: #fffaf8;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 20px;
}

.leaderboard h2 {
    color: #723b47;
    margin-bottom: 12px;
    font-size: 20px;
}

.leaderboard ol {
    padding-left: 24px;
}

.leaderboard li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

.leaderboard li:last-child {
    border-bottom: none;
}

.leaderboard .empty {
    color: #888;
    list-style: none;
    margin-left: -24px;
}

/* Hidden feature reveal overlay */
body.secret-locked {
    overflow: hidden;
}

.secret-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.secret-overlay.is-hidden {
    display: none;
}

.secret-panel {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(160deg, #fffaf8 0%, #f6eae6 100%);
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
}

.secret-panel-top {
    top: 0;
    border-bottom: 1px solid #ead1cf;
}

.secret-panel-bottom {
    bottom: 0;
    border-top: 1px solid #ead1cf;
}

.secret-overlay.is-open .secret-panel-top {
    transform: translateY(-100%);
}

.secret-overlay.is-open .secret-panel-bottom {
    transform: translateY(100%);
}

.secret-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    cursor: pointer;
    outline: none;
    text-align: center;
    padding: 2rem;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.secret-overlay.is-open .secret-content {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.secret-title {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    font-weight: bold;
    color: #8d4a59;
}

.secret-subtitle {
    font-size: 1.1rem;
    color: #5f4b4b;
    max-width: 420px;
}

.secret-hint {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.9rem;
    color: #d88d92;
    animation: secret-pulse 1.9s ease-in-out infinite;
}

@keyframes secret-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@media (max-width: 600px) {
    body {
        padding: 8px;
        gap: 12px;
    }

    .game-wrapper {
        padding: 12px;
    }

    .scene-wrap {
        width: 100%;
    }
}