/* --- FLIP CARD CONTAINER --- */
.riddle-container {
    width: 100%;
    margin: 30px 0;
}

/* --- CARD STYLES --- */
.riddle-card {
    background-color: transparent;
    width: 100%;
    height: 450px; /* Landscape aspect ratio */
    perspective: 1000px;
    cursor: pointer;
    margin-bottom: 20px;
}

.riddle-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    border-radius: 12px;
}

.riddle-card.flipped .riddle-card-inner {
    transform: rotateY(180deg);
}

.riddle-card-front, .riddle-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}

/* FRONT: Cream/White with Orange Accents */
.riddle-card-front {
    background-color: #FAFAFA;
    background-image: 
        radial-gradient(circle at top right, #FEF1E4 0%, transparent 25%),
        radial-gradient(circle at bottom left, #FEF1E4 0%, transparent 25%);
    border: 1px solid #E5D7D1;
}

.riddle-card-front h1 {
    font-size: 32px;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.3;
}

.click-instruction {
    font-size: 14px;
    color: #888;
    margin-top: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

/* BACK: Orange Background, White Text */
.riddle-card-back {
    background-color: #FF6210; /* Main Orange */
    color: #ffffff;
    transform: rotateY(180deg);
}

.riddle-card-back h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.riddle-card-back .answer-text {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}

/* --- EXPLANATION (Subtler) --- */
.riddle-explanation {
    border-top: 1px solid #eee;
    margin-top: 20px;
    padding-top: 20px;
}

.toggle-btn {
    background: none;
    border: none;
    color: #666;
    font-family: inherit; /* Inherit site font */
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}
.toggle-btn:hover { color: #FF6210; }

.arrow { transition: transform 0.3s; font-size: 12px; }
.toggle-btn.active .arrow { transform: rotate(180deg); }

.explanation-content {
    display: none;
    margin-top: 20px;
    background: #F9F9F9;
    padding: 25px;
    border-left: 4px solid #FF6210;
    border-radius: 4px;
}

.explanation-content.visible { display: block; animation: fadeIn 0.5s; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.explanation-content h2 {
    font-size: 20px;
    color: #444;
    margin-bottom: 10px;
}

.explanation-content p {
    color: #555;
    font-size: 17px;
}
