html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Copperplate', serif;
    background: #f2ede3;
}

#bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.95) saturate(0.95);
    z-index: -2;
}

#veil {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.55) 100%);
    z-index: -1;
}

.content {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 16px;
    box-sizing: border-box;
    color: #000;
}

.eyebrow {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #000;
    font-weight: bold;
}

h1 {
    font-family: 'Copperplate', serif;
    font-weight: 600;
    font-size: clamp(2.4rem, 7vw, 4rem);
    letter-spacing: 0.03em;
    margin: 0;
    color: #000;
    text-shadow: 0 2px 18px rgba(255,255,255,0.6);
}

.subtitle {
    font-style: italic;
    font-size: 1.3rem;
    color: #000;
    margin: 0;
    font-weight: bold;
}

.side-panel {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    background: rgba(255,255,255,0.55);
    border-radius: 10px;
    padding: 16px;
    box-sizing: border-box;
}

#side-left {
    left: 20px;
}

#side-right {
    right: 20px;
}

.side-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
}

#cat-fetch-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
}

#cat-fact-text {
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
    color: #000;
}

.box-wrap {
    position: relative;
    display: inline-block;
    margin: 6px 0;
}

#box {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: block;
}

#box img {
    width: clamp(200px, 32vh, 320px);
    height: clamp(200px, 32vh, 320px);
    object-fit: contain;
    transition: transform 0.25s ease, filter 0.25s ease;
    filter: drop-shadow(0 14px 20px rgba(0,0,0,0.2));
}

#box:hover img {
    transform: scale(1.04) translateY(-2px);
    filter: drop-shadow(0 18px 24px rgba(0,0,0,0.25)) brightness(1.03);
}

.cat-reveal {
    position: absolute;
    bottom: 8%;
    left: 50%;
    width: 120px;
    height: auto;
    transform: translateX(-50%) scale(0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.25));
}

.cat-reveal.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

#result {
    font-family: 'Copperplate', serif;
    font-style: italic;
    font-size: 1.6rem;
    min-height: 1.3em;
    color: #000;
    margin: 0;
    font-weight: bold;
}

#reset-btn, #fetch-cat-btn, #fetch-fact-btn {
    font-size: 1rem;
    padding: 10px 18px;
    border: 1px solid #333;
    border-radius: 4px;
    background: white;
    color: #000;
    cursor: pointer;
}

#reset-btn:hover, #fetch-cat-btn:hover, #fetch-fact-btn:hover {
    background: #eee;
}

#score {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: #000;
    margin: 0;
    font-weight: bold;
}

#score span {
    color: #000;
}