/* ================================================
   💌 BIRTHDAY LOVE LETTER - PREMIUM + RIDDLE
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    user-select: none;
}

body {
    background: #0d0015;
    position: relative;
}

/* === CANVAS === */
#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

#sparkleCanvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* === SCREENS === */
.screen {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* ================================================
   RIDDLE SCREEN
   ================================================ */
.riddle-card {
    width: 380px;
    max-width: 90vw;
    max-height: 92vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    padding: 36px 28px 32px;
    text-align: center;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(150, 50, 200, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: cardFloat 7s ease-in-out infinite;
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 80, 192, 0.3) transparent;
}

.riddle-card::-webkit-scrollbar {
    width: 4px;
}

.riddle-card::-webkit-scrollbar-track {
    background: transparent;
}

.riddle-card::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(200, 80, 192, 0.4), rgba(120, 60, 220, 0.3));
    border-radius: 10px;
}

.riddle-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(200, 80, 192, 0.6), rgba(120, 60, 220, 0.5));
}

@keyframes cardFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.riddle-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    animation: iconSpin 4s ease-in-out infinite;
}

@keyframes iconSpin {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(10deg) scale(1.1);
    }

    75% {
        transform: rotate(-5deg) scale(1.05);
    }
}

.riddle-badge {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: #e0c3fc;
    background: linear-gradient(135deg, rgba(200, 80, 192, 0.25), rgba(120, 60, 220, 0.25));
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 22px;
    border: 1px solid rgba(200, 130, 255, 0.2);
}

.riddle-text {
    margin-bottom: 24px;
}

.riddle-text p {
    font-size: 0.88rem;
    font-weight: 300;
    color: rgba(230, 210, 240, 0.85);
    line-height: 1.7;
    margin-bottom: 10px;
    font-style: italic;
}

/* Riddle Input */
.riddle-input-wrap {
    position: relative;
    margin-bottom: 16px;
}

.riddle-input {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
    transition: all 0.3s;
    caret-color: #c850c0;
}

.riddle-input::placeholder {
    color: rgba(200, 180, 220, 0.3);
    letter-spacing: 1px;
}

.riddle-input:focus {
    border-color: rgba(200, 80, 192, 0.5);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 25px rgba(200, 80, 192, 0.12);
}

.riddle-input.shake {
    animation: inputShake 0.5s ease;
    border-color: #ff4444 !important;
}

@keyframes inputShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-10px);
    }

    40% {
        transform: translateX(10px);
    }

    60% {
        transform: translateX(-6px);
    }

    80% {
        transform: translateX(6px);
    }
}

.riddle-input.correct {
    border-color: #4caf50 !important;
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.3) !important;
}

/* Submit Button */
.riddle-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #c850c0 0%, #7c3aed 50%, #c850c0 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(200, 80, 192, 0.25);
    animation: btnShine 3s ease infinite;
    margin-bottom: 10px;
}

@keyframes btnShine {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.riddle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(200, 80, 192, 0.35);
}

.riddle-btn:active {
    transform: scale(0.97);
}

/* Hint Button */
.hint-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(200, 130, 255, 0.2);
    border-radius: 12px;
    color: rgba(200, 180, 220, 0.7);
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 14px;
}

.hint-btn:hover {
    background: rgba(200, 80, 192, 0.1);
    border-color: rgba(200, 130, 255, 0.4);
    color: #e0c3fc;
}

.hint-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Hint Area */
.hint-area {
    text-align: left;
    margin-bottom: 10px;
}

.hint-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(200, 80, 192, 0.08);
    border: 1px solid rgba(200, 130, 255, 0.12);
    border-radius: 12px;
    margin-bottom: 8px;
    animation: hintSlide 0.4s ease;
}

@keyframes hintSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hint-item .hint-emoji {
    font-size: 1rem;
    flex-shrink: 0;
}

.hint-item .hint-text {
    font-size: 0.8rem;
    color: rgba(220, 200, 240, 0.8);
    font-weight: 300;
    line-height: 1.5;
}

/* Feedback */
.riddle-feedback {
    margin-top: 8px;
    min-height: 24px;
}

.feedback-msg {
    font-size: 0.82rem;
    color: #ff6b9d;
    animation: feedbackPop 0.3s ease;
}

@keyframes feedbackPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.feedback-msg.success {
    color: #4caf50;
}

/* Decorative */
.riddle-hearts {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.riddle-hearts span {
    font-size: 0.9rem;
    opacity: 0.25;
    animation: heartDance 2.5s ease-in-out infinite;
}

.riddle-hearts span:nth-child(1) {
    animation-delay: 0s;
}

.riddle-hearts span:nth-child(2) {
    animation-delay: 0.3s;
}

.riddle-hearts span:nth-child(3) {
    animation-delay: 0.6s;
}

.riddle-hearts span:nth-child(4) {
    animation-delay: 0.9s;
}

.riddle-hearts span:nth-child(5) {
    animation-delay: 1.2s;
}

@keyframes heartDance {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.25;
    }

    50% {
        transform: translateY(-5px) scale(1.3);
        opacity: 0.6;
    }
}

/* ================================================
   SELF-DESTRUCT OVERLAY (joke)
   ================================================ */
.destruct-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: linear-gradient(135deg, #1a0025 0%, #0d0015 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s;
}

.destruct-overlay.active {
    opacity: 1;
    visibility: visible;
}

.destruct-content {
    text-align: center;
    padding: 40px;
}

.destruct-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: destructPulse 1.5s ease-in-out infinite;
}

@keyframes destructPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.destruct-title {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    color: #f48fb1;
    letter-spacing: 2px;
    margin-bottom: 24px;
    text-shadow: 0 0 20px rgba(244, 143, 177, 0.3);
    animation: none;
}

@keyframes titleFlicker {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.7;
    }
}

.destruct-bar-wrap {
    width: 260px;
    max-width: 80vw;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 0 auto 20px;
    overflow: hidden;
}

.destruct-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f48fb1, #ce93d8, #f48fb1);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: barGlow 2s linear infinite;
    transition: width 0.3s linear;
}

@keyframes barGlow {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

.destruct-text {
    font-size: 0.9rem;
    color: rgba(230, 200, 220, 0.7);
    font-weight: 300;
    margin-bottom: 10px;
}

.destruct-joke {
    font-size: 1rem;
    color: #f8bbd0;
    font-weight: 500;
    animation: jokeFade 0.5s ease;
}

@keyframes jokeFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================
   TRANSITION SCREEN
   ================================================ */
.transition-screen {
    z-index: 30;
}

.transition-content {
    text-align: center;
}

.transition-hearts {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.transition-hearts span {
    font-size: 2.2rem;
    animation: transitionBounce 1.2s ease-in-out infinite;
}

@keyframes transitionBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-16px) scale(1.15);
    }
}

.transition-text {
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
    color: #f8bbd0;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.transition-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.transition-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f48fb1;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.transition-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.transition-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ================================================
   ENVELOPE SCREEN
   ================================================ */
.envelope-screen {
    flex-direction: column;
}

.env-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.env {
    position: relative;
    width: 280px;
    height: 190px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.env:hover {
    transform: translateY(-6px) scale(1.03);
}

.env:active {
    transform: scale(0.96);
}

.env-back {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #ff8fab 0%, #fb6f92 100%);
    border-radius: 12px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(251, 111, 146, 0.15);
    z-index: 1;
}

.env-letter-peek {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 88%;
    background: linear-gradient(180deg, #fffdf5, #fef5ed);
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.env-flap-left {
    position: absolute;
    bottom: 0;
    left: 0;
    border-style: solid;
    border-width: 95px 0 95px 140px;
    border-color: transparent transparent transparent #ff6b8a;
    z-index: 3;
}

.env-flap-right {
    position: absolute;
    bottom: 0;
    right: 0;
    border-style: solid;
    border-width: 95px 140px 95px 0;
    border-color: transparent #ff6b8a transparent transparent;
    z-index: 3;
}

.env-flap-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    border-style: solid;
    border-width: 0 140px 105px 140px;
    border-color: transparent transparent #fb6f92 transparent;
    z-index: 4;
    filter: drop-shadow(0 -1px 3px rgba(0, 0, 0, 0.06));
}

.env-lid {
    position: absolute;
    top: 0;
    left: 0;
    border-style: solid;
    border-width: 105px 140px 0 140px;
    border-color: #ff8fab transparent transparent transparent;
    transform-origin: top center;
    z-index: 5;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.env-lid.open {
    transform: rotateX(180deg);
    z-index: 0;
}

.env-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 35% 35%, #ff4081, #c2185b);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    box-shadow:
        0 4px 18px rgba(255, 64, 129, 0.5),
        0 0 40px rgba(255, 64, 129, 0.15);
    animation: heartBeat 1.4s ease-in-out infinite;
    transition: all 0.5s;
}

@keyframes heartBeat {

    0%,
    60%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    15% {
        transform: translate(-50%, -50%) scale(1.18);
    }

    30% {
        transform: translate(-50%, -50%) scale(1);
    }

    45% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.env-seal.hide {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(180deg);
}

.env-hint {
    color: rgba(255, 200, 220, 0.7);
    font-size: 0.9rem;
    animation: hintPulse 3s ease-in-out infinite;
}

@keyframes hintPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ================================================
   LETTER SCREEN
   ================================================ */
.letter-screen {
    z-index: 50;
}

.letter-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 0, 12, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.letter-card {
    position: relative;
    width: 420px;
    max-width: 92vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(175deg, #fffef9 0%, #fef8f2 30%, #fff5f7 70%, #fffef9 100%);
    border-radius: 22px;
    overflow: hidden;
    z-index: 2;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 200, 220, 0.15),
        0 0 120px rgba(255, 100, 150, 0.08);
    transform: translateY(40px) scale(0.9);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s, opacity 0.6s ease 0.1s;
}

.letter-screen.active .letter-card {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: letterGlow 4s ease-in-out infinite;
}

@keyframes letterGlow {

    0%,
    100% {
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 200, 220, 0.15), 0 0 60px rgba(255, 100, 150, 0.05);
    }

    50% {
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 200, 220, 0.25), 0 0 100px rgba(255, 100, 150, 0.12);
    }
}

.letter-top-decor {
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #ec407a, #f48fb1, #ce93d8, #f48fb1, #ec407a);
    background-size: 300% 100%;
    animation: shimmerBar 4s linear infinite;
    flex-shrink: 0;
}

.letter-bottom-decor {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f48fb1, transparent);
    flex-shrink: 0;
}

@keyframes shimmerBar {
    0% {
        background-position: 300% 0;
    }

    100% {
        background-position: -300% 0;
    }
}

.letter-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 34px 28px 30px;
    scrollbar-width: thin;
    scrollbar-color: #f48fb1 transparent;
}

.letter-scroll::-webkit-scrollbar {
    width: 4px;
}

.letter-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.letter-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f48fb1, #ce93d8);
    border-radius: 10px;
}

.letter-title {
    font-family: 'Dancing Script', cursive;
    font-size: 1.65rem;
    font-weight: 700;
    color: #b71c5c;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.35;
    animation: titleFadeIn 1.2s ease 0.5s both;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.letter-divider {
    text-align: center;
    margin-bottom: 24px;
    animation: titleFadeIn 1.2s ease 0.7s both;
}

.letter-divider span {
    display: inline-block;
    color: #f06292;
    font-size: 0.9rem;
    letter-spacing: 12px;
    opacity: 0.6;
    animation: dividerPulse 3s ease-in-out infinite;
}

@keyframes dividerPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.letter-body p {
    font-size: 0.9rem;
    font-weight: 300;
    color: #4a3f45;
    line-height: 1.85;
    margin-bottom: 16px;
    text-align: left;
    text-indent: 1.2rem;
    animation: paragraphFade 0.8s ease both;
}

.letter-body p:nth-child(1) {
    animation-delay: 0.8s;
}

.letter-body p:nth-child(2) {
    animation-delay: 1.0s;
}

.letter-body p:nth-child(3) {
    animation-delay: 1.2s;
}

.letter-body p:nth-child(4) {
    animation-delay: 1.4s;
}

.letter-body p:nth-child(5) {
    animation-delay: 1.6s;
}

.letter-body p:nth-child(6) {
    animation-delay: 1.8s;
}

@keyframes paragraphFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.letter-body p em {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: #ad1457;
    font-weight: 400;
    font-size: 0.95rem;
}

.letter-closing {
    text-align: center !important;
    text-indent: 0 !important;
    margin-top: 28px !important;
    font-weight: 400 !important;
    color: #880e4f !important;
    line-height: 2.3 !important;
    font-size: 0.95rem !important;
}

.letter-closing strong {
    display: inline-block;
    font-size: 1.15rem;
    color: #c2185b;
    animation: lovebeat 2s ease-in-out infinite;
}

@keyframes lovebeat {

    0%,
    100% {
        transform: scale(1);
    }

    20% {
        transform: scale(1.08);
    }

    30% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.05);
    }
}

.letter-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: #c2185b;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-close:hover {
    background: #c2185b;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* ================================================
   CONFETTI
   ================================================ */
.confetti {
    position: fixed;
    pointer-events: none;
    z-index: 200;
    will-change: transform;
}

@keyframes confettiDrop {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(0);
    }

    10% {
        opacity: 1;
        transform: translateY(-40px) rotate(30deg) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(105vh) rotate(720deg) scale(0.5);
    }
}

/* ================================================
   MOBILE
   ================================================ */
@media (max-width: 480px) {
    .riddle-card {
        padding: 28px 22px 26px;
        border-radius: 22px;
    }

    .riddle-badge {
        font-size: 0.65rem;
    }

    .riddle-text p {
        font-size: 0.82rem;
    }

    .riddle-icon {
        font-size: 2.6rem;
    }

    .env {
        width: 240px;
        height: 162px;
    }

    .env-lid {
        border-width: 90px 120px 0 120px;
    }

    .env-flap-left {
        border-width: 81px 0 81px 120px;
    }

    .env-flap-right {
        border-width: 81px 120px 81px 0;
    }

    .env-flap-bottom {
        border-width: 0 120px 90px 120px;
    }

    .env-seal {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .letter-card {
        max-width: 95vw;
        max-height: 88vh;
        border-radius: 18px;
    }

    .letter-scroll {
        padding: 26px 20px 24px;
    }

    .letter-title {
        font-size: 1.4rem;
    }

    .letter-body p {
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .env {
        width: 210px;
        height: 142px;
    }

    .env-lid {
        border-width: 78px 105px 0 105px;
    }

    .env-flap-left {
        border-width: 71px 0 71px 105px;
    }

    .env-flap-right {
        border-width: 71px 105px 71px 0;
    }

    .env-flap-bottom {
        border-width: 0 105px 78px 105px;
    }

    .riddle-card {
        padding: 24px 18px 22px;
        max-width: 94vw;
    }

    .riddle-badge {
        font-size: 0.6rem;
    }
}

/* ================================================
   MUSIC BUTTON
   ================================================ */
.music-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.music-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.music-btn.playing {
    border-color: #f48fb1;
    color: #f48fb1;
    animation: musicPulse 2s infinite;
}

@keyframes musicPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 143, 177, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(244, 143, 177, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(244, 143, 177, 0);
    }
}

#youtube-player {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    z-index: -100;
}