/* Prevent screen from turning off */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html, body {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Keep screen awake */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    animation: keep-awake 30s linear infinite;
}

@keyframes keep-awake {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.001;
    }
}

/* customizable snowflake styling */
.start-message {
    position: fixed;
    left: 50%;
    top: 30%;
    transform: translateX(-50%);
    font-size: 28px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.6);
    z-index: 99999999999999999999999;
    text-align: center;
    font-weight: bold;
    width: 90%;
    max-width: 600px;
    animation: glow 1.5s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.loader button {
    width: 50%;
    max-width: 300px;
    min-width: 200px;
    height: 100px;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: center no-repeat #fff;
    z-index: 9999999999999999999999;
    font-size: 40px;
    outline: none;
    box-sizing: border-box;
    border: none;
    border-radius: .3em;
    text-transform: uppercase;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(110, 80, 20, .4),
        inset 0 -2px 5px 1px rgba(139, 66, 8, 1),
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 1px solid #a55d07;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
    cursor: pointer;
    transition: all .2s ease-in-out;
    background-size: 100% 100%;
    background-position: center;
}

@media (max-width: 768px) {
    .loader button {
        width: 70%;
        height: 80px;
        font-size: 28px;
    }

    .start-message {
        font-size: 22px;
        top: 25%;
    }
}

.golden-btn:focus,
.golden-btn:hover {
    background-size: 150% 150%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23),
        inset 0 -2px 5px 1px #b17d10,
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
    border: 1px solid rgba(165, 93, 7, .6);
    color: rgba(120, 50, 5, .8);
}

.golden-btn:active {
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(110, 80, 20, .4),
        inset 0 -2px 5px 1px #b17d10,
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
}

.loader {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 999;
    background: url(img/back.png) center no-repeat #000;
}

.song {
    display: none;
}

body {
    background-color: #FFDAB9;
}

img {
    width: 100%;
}

.balloon-border {
    position: fixed;
    top: 100%;
    opacity: 0.5;
    z-index: 99999999;
}

.area {
    text-align: center;
    font-size: 70px;
    color: #C4515C;
    letter-spacing: -7px;
    font-weight: 700;
    text-transform: uppercase;
    animation: spin 2s ease-out infinite;
    text-shadow: 0px 0px 5px #fff, 0px 0px 7px #fff;
}

#nae {
    text-transform: capitalize;
}

#confetti {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
}

@keyframes spin {
    0% {
        transform: rotateZ(0);
    }

    25% {
        transform: rotateZ(10deg);
    }

    50% {
        transform: rotateZ(0deg);
    }

    75% {
        transform: rotateZ(-10deg);
    }
}

.type-wrap {
    font-size: 25px;
    color: #C4515C;

}

.cake {
    transform: translateY(-50%);
    transform: translateX(-50%);
    left: 50%;
    position: absolute;
    padding-top: 250px;
}

/* PIN Screen Styles */
.pin-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 9998;
    overflow-y: auto;
}

.pin-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    text-align: center;
}

.pin-title {
    font-size: 32px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.6);
    margin-bottom: 15px;
    font-weight: bold;
    animation: glow 1.5s ease-in-out infinite;
}

.pin-subtitle {
    font-size: 20px;
    color: #C4515C;
    text-shadow: 0 0 5px #fff;
    margin-bottom: 30px;
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.pin-dot {
    width: 20px;
    height: 20px;
    border: 3px solid #ffd700;
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s ease;
}

.pin-dot.filled {
    background: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.pin-hint {
    font-size: 24px;
    color: #ffd700;
    margin: 20px 0;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.pin-error {
    font-size: 22px;
    color: #ff4444;
    margin: 15px 0;
    min-height: 30px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 350px;
    margin: 30px auto;
}

.pin-key {
    padding: 25px;
    font-size: 28px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(110, 80, 20, .4),
        inset 0 -2px 5px 1px rgba(139, 66, 8, 1),
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 1px solid #a55d07;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
}

.pin-key:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.pin-key:active {
    transform: scale(0.95);
}

.pin-clear,
.pin-delete {
    font-size: 20px;
}

@media (max-width: 768px) {
    .pin-container {
        margin: 20px auto;
        padding: 15px;
    }

    .pin-title {
        font-size: 24px;
    }

    .pin-subtitle {
        font-size: 16px;
    }

    .pin-hint {
        font-size: 18px;
    }

    .pin-error {
        font-size: 18px;
    }

    .pin-display {
        gap: 10px;
    }

    .pin-dot {
        width: 15px;
        height: 15px;
    }

    .pin-keypad {
        gap: 10px;
        max-width: 300px;
    }

    .pin-key {
        padding: 20px;
        font-size: 24px;
    }

    .pin-clear,
    .pin-delete {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .pin-title {
        font-size: 20px;
    }

    .pin-subtitle {
        font-size: 14px;
    }

    .pin-keypad {
        max-width: 250px;
    }

    .pin-key {
        padding: 15px;
        font-size: 20px;
    }
}

/* Name Selection Screen */
.name-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 9999;
    overflow: hidden;
}

.name-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}

.name-question {
    font-size: 36px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.6);
    margin-bottom: 60px;
    font-weight: bold;
    animation: glow 1.5s ease-in-out infinite;
}

.name-hint {
    font-size: 24px;
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
    margin-bottom: 30px;
    font-weight: bold;
    display: none;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.name-buttons-container {
    position: relative;
    height: 200px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.name-btn {
    padding: 20px 50px;
    font-size: 32px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(110, 80, 20, .4),
        inset 0 -2px 5px 1px rgba(139, 66, 8, 1),
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 1px solid #a55d07;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
}

.name-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.moving-btn {
    position: absolute;
    left: 30%;
    top: 50%;
    transform: translate(-50%, -50%);
}

#bukkuBtn {
    position: absolute;
    right: 20%;
    top: 50%;
    transform: translate(50%, -50%);
}

/* Greeting Screen */
.greeting-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 10000;
}

.greeting-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
}

.greeting-text {
    font-size: 48px;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6);
    margin-bottom: 20px;
    font-weight: bold;
    animation: pulse 1s ease-in-out infinite;
}

.greeting-subtext {
    font-size: 28px;
    color: #C4515C;
    text-shadow: 0 0 10px #fff;
    margin-bottom: 30px;
    font-weight: bold;
    animation: glow 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.countdown-timer {
    font-size: 120px;
    color: #C4515C;
    text-shadow: 0 0 20px #fff, 0 0 40px #fff;
    font-weight: bold;
    animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .name-question {
        font-size: 28px;
        margin-bottom: 50px;
    }

    .name-hint {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .name-btn {
        padding: 18px 40px;
        font-size: 26px;
    }

    .greeting-text {
        font-size: 36px;
    }

    .greeting-subtext {
        font-size: 22px;
    }

    .countdown-timer {
        font-size: 90px;
    }
}

@media (max-width: 480px) {
    .name-question {
        font-size: 22px;
        margin-bottom: 40px;
    }

    .name-hint {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .name-btn {
        padding: 15px 35px;
        font-size: 22px;
    }

    .greeting-text {
        font-size: 28px;
    }

    .greeting-subtext {
        font-size: 18px;
    }

    .countdown-timer {
        font-size: 70px;
    }
}

/* Volume Check Screen */
.volume-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 9999;
}

.volume-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 600px;
    padding: 40px 20px;
}

.volume-title {
    font-size: 42px;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6);
    margin-bottom: 30px;
    font-weight: bold;
    animation: glow 1.5s ease-in-out infinite;
}

.volume-message {
    font-size: 28px;
    color: #C4515C;
    text-shadow: 0 0 10px #fff;
    margin-bottom: 15px;
    font-weight: bold;
}

.volume-subtitle {
    font-size: 22px;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    margin-bottom: 40px;
}

.volume-icon {
    font-size: 100px;
    margin: 40px 0;
    animation: volume-pulse 1s ease-in-out infinite;
}

@keyframes volume-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.volume-wave {
    display: inline-block;
    animation: wave 1.5s ease-in-out infinite;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.volume-btn {
    padding: 20px 60px;
    font-size: 28px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(110, 80, 20, .4),
        inset 0 -2px 5px 1px rgba(139, 66, 8, 1),
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 1px solid #a55d07;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
    margin-top: 30px;
}

.volume-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.volume-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .volume-title {
        font-size: 36px;
    }

    .volume-message {
        font-size: 24px;
    }

    .volume-subtitle {
        font-size: 18px;
    }

    .volume-icon {
        font-size: 80px;
    }

    .volume-btn {
        padding: 18px 50px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .volume-title {
        font-size: 30px;
    }

    .volume-message {
        font-size: 20px;
    }

    .volume-subtitle {
        font-size: 16px;
    }

    .volume-icon {
        font-size: 70px;
        margin: 30px 0;
    }

    .volume-btn {
        padding: 15px 40px;
        font-size: 20px;
    }
}

/* Volume Confirmation Screen */
.volume-confirm-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 9999;
}

.volume-confirm-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 600px;
    padding: 40px 20px;
}

.volume-confirm-title {
    font-size: 42px;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6);
    margin-bottom: 50px;
    font-weight: bold;
    animation: glow 1.5s ease-in-out infinite;
}

.volume-confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.volume-confirm-btn {
    padding: 25px 50px;
    font-size: 32px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(110, 80, 20, .4),
        inset 0 -2px 5px 1px rgba(139, 66, 8, 1),
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 1px solid #a55d07;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
}

.volume-confirm-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.volume-confirm-btn:active {
    transform: scale(0.95);
}

.yes-btn {
    background-image: linear-gradient(160deg, #07a54e, #11b47e, #a2fef1, #1bbc88, #07a54e);
}

.no-btn {
    background-image: linear-gradient(160deg, #a50707, #b41111, #fea2a2, #bc1b1b, #a50707);
}

.volume-reminder {
    margin-top: 30px;
}

.reminder-text {
    font-size: 36px;
    color: #ff4444;
    text-shadow: 0 0 15px rgba(255, 68, 68, 0.8);
    margin-bottom: 25px;
    font-weight: bold;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.volume-done-btn {
    padding: 20px 50px;
    font-size: 28px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(110, 80, 20, .4),
        inset 0 -2px 5px 1px rgba(139, 66, 8, 1),
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 1px solid #a55d07;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
}

.volume-done-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

@media (max-width: 768px) {
    .volume-confirm-title {
        font-size: 32px;
        margin-bottom: 40px;
    }

    .volume-confirm-buttons {
        gap: 20px;
    }

    .volume-confirm-btn {
        padding: 20px 40px;
        font-size: 26px;
    }

    .reminder-text {
        font-size: 28px;
    }

    .volume-done-btn {
        padding: 18px 45px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .volume-confirm-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .volume-confirm-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .volume-confirm-btn {
        padding: 18px 35px;
        font-size: 22px;
        width: 100%;
    }

    .reminder-text {
        font-size: 24px;
    }

    .volume-done-btn {
        padding: 15px 40px;
        font-size: 20px;
    }
}

/* Sound Reminder Screen */
.sound-reminder-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 10003;
}

.sound-reminder-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 600px;
    padding: 40px 20px;
}

.sound-reminder-title {
    font-size: 80px;
    margin-bottom: 30px;
    animation: emoji-bounce 1s ease-in-out infinite;
}

@keyframes emoji-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

.sound-reminder-text {
    font-size: 32px;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6);
    margin-bottom: 15px;
    font-weight: bold;
    animation: glow 1.5s ease-in-out infinite;
}

.sound-reminder-text2 {
    font-size: 28px;
    color: #C4515C;
    text-shadow: 0 0 10px #fff;
    margin-bottom: 40px;
    font-weight: bold;
    animation: shake 0.5s ease-in-out infinite;
}

.sound-reminder-btn {
    padding: 20px 80px;
    font-size: 32px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(110, 80, 20, .4),
        inset 0 -2px 5px 1px rgba(139, 66, 8, 1),
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 1px solid #a55d07;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
    animation: pulse 2s ease-in-out infinite;
}

.sound-reminder-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.sound-reminder-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .sound-reminder-title {
        font-size: 60px;
    }

    .sound-reminder-text {
        font-size: 26px;
    }

    .sound-reminder-text2 {
        font-size: 22px;
    }

    .sound-reminder-btn {
        padding: 18px 70px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .sound-reminder-title {
        font-size: 50px;
    }

    .sound-reminder-text {
        font-size: 22px;
    }

    .sound-reminder-text2 {
        font-size: 18px;
    }

    .sound-reminder-btn {
        padding: 15px 60px;
        font-size: 24px;
    }
}

/* Reveal Screen */
.reveal-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 10003;
}

.reveal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 800px;
    padding: 40px 20px;
}

.reveal-text {
    font-size: 48px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
    font-weight: bold;
    line-height: 1.4;
    animation: reveal-fade-in 0.8s ease-in-out;
    opacity: 0;
}

.reveal-text.show {
    opacity: 1;
}

.reveal-text.hide {
    animation: reveal-fade-out 0.8s ease-in-out;
    opacity: 0;
}

@keyframes reveal-fade-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes reveal-fade-out {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@media (max-width: 768px) {
    .reveal-text {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .reveal-text {
        font-size: 28px;
    }
}

/* Slideshow Screen */
.slideshow-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #1a0a0a 50%, #000000 100%);
    z-index: 10004;
    overflow: hidden;
}

/* First Image Full Screen */
.first-image-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
}

.first-image-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.first-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.first-image-text {
    font-size: 80px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 
                 0 0 40px rgba(255, 215, 0, 0.6),
                 0 0 60px rgba(255, 215, 0, 0.4),
                 0 5px 15px rgba(0, 0, 0, 0.8);
    font-weight: bold;
    text-align: center;
    animation: first-text-glow 2s ease-in-out infinite;
    letter-spacing: 5px;
}

@keyframes first-text-glow {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 
                     0 0 40px rgba(255, 215, 0, 0.6),
                     0 0 60px rgba(255, 215, 0, 0.4),
                     0 5px 15px rgba(0, 0, 0, 0.8);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 30px rgba(255, 215, 0, 1), 
                     0 0 60px rgba(255, 215, 0, 0.8),
                     0 0 90px rgba(255, 215, 0, 0.6),
                     0 5px 20px rgba(0, 0, 0, 0.9);
    }
}

@media (max-width: 768px) {
    .first-image-text {
        font-size: 50px;
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    .first-image-text {
        font-size: 36px;
        letter-spacing: 2px;
    }
}

.slideshow-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.slideshow-image-wrapper {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5), 0 0 100px rgba(255, 215, 0, 0.3);
}

.slideshow-caption {
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.6);
    line-height: 1.4;
    border-radius: 15px;
    border: 2px solid #ffd700;
    animation: caption-fade-in 1s ease-out;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

@keyframes caption-fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .slideshow-caption {
        font-size: 22px;
        padding: 25px 15px;
    }
}

@media (max-width: 480px) {
    .slideshow-caption {
        font-size: 18px;
        padding: 20px 12px;
    }
}

.slideshow-image {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.slideshow-image.first-special {
    animation: firstSpecial 2s ease-in-out;
}

@keyframes firstSpecial {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
        filter: blur(10px);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(360deg);
        filter: blur(0);
    }
}

/* Funnier Animation classes */
.slideshow-image.crazy-spin {
    animation: crazySpin 1.5s ease-in-out;
}

.slideshow-image.wobble-in {
    animation: wobbleIn 1.5s ease-in-out;
}

.slideshow-image.elastic-bounce {
    animation: elasticBounce 1.5s ease-in-out;
}

.slideshow-image.swing-in {
    animation: swingIn 1.5s ease-in-out;
}

.slideshow-image.jello {
    animation: jello 1.5s ease-in-out;
}

.slideshow-image.rubber-band {
    animation: rubberBand 1.5s ease-in-out;
}

.slideshow-image.tada {
    animation: tada 1.5s ease-in-out;
}

@keyframes crazySpin {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg) translateY(-200px);
    }
    60% {
        transform: scale(1.1) rotate(720deg) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(720deg) translateY(0);
    }
}

@keyframes wobbleIn {
    0% {
        opacity: 0;
        transform: translateX(-100%) rotate(-120deg);
    }
    15% {
        transform: translateX(20%) rotate(30deg);
    }
    30% {
        transform: translateX(-15%) rotate(-20deg);
    }
    45% {
        transform: translateX(10%) rotate(15deg);
    }
    60% {
        transform: translateX(-5%) rotate(-10deg);
    }
    75% {
        transform: translateX(2%) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotate(0);
    }
}

@keyframes elasticBounce {
    0% {
        opacity: 0;
        transform: scale(0) translateY(-500px);
    }
    40% {
        transform: scale(1.2) translateY(0);
    }
    60% {
        transform: scale(0.8) translateY(-30px);
    }
    80% {
        transform: scale(1.1) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes swingIn {
    0% {
        opacity: 0;
        transform: rotate(-90deg) scale(0);
        transform-origin: top center;
    }
    20% {
        transform: rotate(60deg) scale(1.1);
    }
    40% {
        transform: rotate(-40deg) scale(1);
    }
    60% {
        transform: rotate(20deg) scale(1.05);
    }
    80% {
        transform: rotate(-10deg) scale(1);
    }
    100% {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes jello {
    0%, 100% {
        transform: scale3d(1, 1, 1);
    }
    30% {
        transform: scale3d(1.25, 0.75, 1);
    }
    40% {
        transform: scale3d(0.75, 1.25, 1);
    }
    50% {
        transform: scale3d(1.15, 0.85, 1);
    }
    65% {
        transform: scale3d(0.95, 1.05, 1);
    }
    75% {
        transform: scale3d(1.05, 0.95, 1);
    }
}

@keyframes rubberBand {
    0% {
        opacity: 0;
        transform: scale3d(0, 0, 1);
    }
    30% {
        transform: scale3d(1.25, 0.75, 1);
    }
    40% {
        transform: scale3d(0.75, 1.25, 1);
    }
    50% {
        transform: scale3d(1.15, 0.85, 1);
    }
    65% {
        transform: scale3d(0.95, 1.05, 1);
    }
    75% {
        transform: scale3d(1.05, 0.95, 1);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes tada {
    0% {
        opacity: 0;
        transform: scale3d(0.5, 0.5, 0.5) rotate3d(0, 0, 1, -180deg);
    }
    10%, 20% {
        transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
    }
    40%, 60%, 80% {
        transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 0);
    }
}

.slideshow-counter {
    position: relative;
    font-size: 32px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.6);
    font-weight: bold;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 35px;
    border-radius: 50px;
    border: 3px solid #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: counter-bounce 2s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.counter-emoji {
    font-size: 36px;
    animation: emoji-spin 3s linear infinite;
}

@keyframes counter-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes emoji-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Typing Message */
.typing-message-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
}

.typing-text {
    font-size: 24px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    line-height: 1.8;
    margin: 0;
    font-weight: 500;
    text-align: center;
    white-space: pre-wrap;
}

.typing-text::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Final Birthday Message */
.final-birthday-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.final-message-text {
    font-size: 80px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 
                 0 0 40px rgba(255, 215, 0, 0.6),
                 0 0 60px rgba(255, 215, 0, 0.4);
    font-weight: bold;
    margin: 0;
    animation: birthday-zoom 2s ease-in-out infinite;
    letter-spacing: 5px;
}

.final-message-love {
    font-size: 100px;
    background: linear-gradient(45deg, #ff0080, #ff8c00, #ffd700, #ff0080);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    margin: 20px 0;
    animation: gradient-flow 3s ease infinite, love-pulse 1.5s ease-in-out infinite;
    letter-spacing: 8px;
    text-shadow: 0 0 30px rgba(255, 0, 128, 0.5);
}

@keyframes birthday-zoom {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes love-pulse {
    0%, 100% {
        transform: scale(1) rotate(-2deg);
    }
    25% {
        transform: scale(1.15) rotate(2deg);
    }
    50% {
        transform: scale(1.05) rotate(-1deg);
    }
    75% {
        transform: scale(1.15) rotate(1deg);
    }
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hearts-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.heart {
    font-size: 60px;
    display: inline-block;
    animation: heart-float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 0, 128, 0.8));
}

.heart:nth-child(1) {
    animation-delay: 0s;
}

.heart:nth-child(2) {
    animation-delay: 0.2s;
}

.heart:nth-child(3) {
    animation-delay: 0.4s;
}

.heart:nth-child(4) {
    animation-delay: 0.6s;
}

.heart:nth-child(5) {
    animation-delay: 0.8s;
}

@keyframes heart-float {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) scale(1.2) rotate(-10deg);
    }
    50% {
        transform: translateY(-10px) scale(1.1) rotate(5deg);
    }
    75% {
        transform: translateY(-25px) scale(1.15) rotate(-5deg);
    }
}

.slideshow-replay-btn {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 50px;
    font-size: 28px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(110, 80, 20, .4),
        inset 0 -2px 5px 1px rgba(139, 66, 8, 1),
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 1px solid #a55d07;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
    animation: pulse 2s ease-in-out infinite;
}

.slideshow-replay-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

@media (max-width: 768px) {
    .slideshow-container {
        width: 95%;
        height: 85vh;
    }
    
    .slideshow-image-wrapper {
        flex: 2;
    }

    .slideshow-counter {
        font-size: 24px;
        padding: 10px 28px;
        gap: 10px;
    }

    .counter-emoji {
        font-size: 28px;
    }

    .typing-message-container {
        padding: 30px 25px;
    }

    .typing-text {
        font-size: 20px;
        line-height: 1.7;
    }

    .final-message-text {
        font-size: 50px;
        letter-spacing: 3px;
    }

    .final-message-love {
        font-size: 60px;
        letter-spacing: 5px;
    }

    .hearts-container {
        gap: 20px;
        margin-top: 30px;
    }

    .heart {
        font-size: 45px;
    }
}

@media (max-width: 480px) {
    .slideshow-container {
        height: 80vh;
    }
    
    .slideshow-image-wrapper {
        flex: 2.5;
    }
    
    .slideshow-caption {
        min-height: 70px;
    }

    .slideshow-counter {
        font-size: 20px;
        padding: 8px 22px;
        gap: 8px;
    }

    .counter-emoji {
        font-size: 24px;
    }

    .typing-message-container {
        padding: 25px 20px;
        width: 95%;
    }

    .typing-text {
        font-size: 16px;
        line-height: 1.6;
    }

    .final-message-text {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .final-message-love {
        font-size: 48px;
        letter-spacing: 3px;
    }

    .hearts-container {
        gap: 15px;
        margin-top: 25px;
    }

    .heart {
        font-size: 35px;
    }
}

/* Quiz Screen */
.quiz-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 10001;
    overflow-y: auto;
}

.quiz-screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-container {
    max-width: 700px;
    width: 90%;
    margin: 30px auto;
    padding: 30px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.quiz-title {
    font-size: 32px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    margin: 0;
    font-weight: bold;
}

.quiz-progress {
    font-size: 24px;
    color: #C4515C;
    font-weight: bold;
    text-shadow: 0 0 5px #fff;
}

.quiz-content {
    margin-bottom: 30px;
}

.quiz-question {
    font-size: 24px;
    color: #ffd700;
    margin-bottom: 25px;
    line-height: 1.5;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-option {
    padding: 18px 25px;
    font-size: 20px;
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 2px solid #a55d07;
    border-radius: 12px;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16);
}

.quiz-option:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.quiz-option.selected {
    border: 3px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    transform: scale(1.02);
}

.quiz-submit-btn {
    width: 100%;
    padding: 18px;
    font-size: 26px;
    font-weight: bold;
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 2px solid #a55d07;
    border-radius: 15px;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16);
}

.quiz-submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.quiz-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quiz Result Screen */
.quiz-result-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 10002;
}

.quiz-result-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 600px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
}

.result-title {
    font-size: 42px;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    margin-bottom: 20px;
    font-weight: bold;
    animation: glow 1.5s ease-in-out infinite;
}

.result-score {
    font-size: 80px;
    color: #C4515C;
    text-shadow: 0 0 20px #fff;
    font-weight: bold;
    margin: 20px 0;
}

.result-message {
    font-size: 24px;
    color: #ffd700;
    margin: 20px 0;
    line-height: 1.6;
}

.result-btn {
    padding: 18px 50px;
    font-size: 26px;
    font-weight: bold;
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 2px solid #a55d07;
    border-radius: 15px;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16);
    margin-top: 20px;
}

.result-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

@media (max-width: 768px) {
    .quiz-container {
        margin: 20px auto;
        padding: 20px;
        width: 85%;
    }

    .quiz-title {
        font-size: 26px;
    }

    .quiz-progress {
        font-size: 20px;
    }

    .quiz-question {
        font-size: 20px;
    }

    .quiz-option {
        padding: 15px 20px;
        font-size: 18px;
    }

    .quiz-submit-btn {
        font-size: 22px;
        padding: 15px;
    }

    .result-title {
        font-size: 32px;
    }

    .result-score {
        font-size: 60px;
    }

    .result-message {
        font-size: 20px;
    }

    .result-btn {
        font-size: 22px;
        padding: 15px 40px;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        margin: 15px auto;
        padding: 15px;
        width: 90%;
    }

    .quiz-title {
        font-size: 22px;
    }

    .quiz-progress {
        font-size: 18px;
    }

    .quiz-question {
        font-size: 18px;
    }

    .quiz-option {
        padding: 12px 15px;
        font-size: 16px;
    }

    .quiz-submit-btn {
        font-size: 20px;
        padding: 12px;
    }

    .result-title {
        font-size: 28px;
    }

    .result-score {
        font-size: 50px;
    }

    .result-message {
        font-size: 18px;
    }

    .result-btn {
        font-size: 20px;
        padding: 12px 35px;
    }
}


/* Gift Surprise Screen */
.gift-surprise-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 10006;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-surprise-container {
    text-align: center;
    width: 90%;
    max-width: 600px;
}

.gift-surprise-title {
    font-size: 60px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
    font-weight: bold;
    margin-bottom: 60px;
    animation: glow 1.5s ease-in-out infinite;
}

.gift-box {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    cursor: pointer;
    animation: gift-bounce 2s ease-in-out infinite;
}

.gift-box:hover {
    animation: gift-shake 0.5s ease-in-out infinite;
}

.gift-box-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 140px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gift-box-lid {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 40px;
    background: linear-gradient(135deg, #ff8787 0%, #ff6b6b 100%);
    border-radius: 10px 10px 5px 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    transform-origin: bottom center;
    transition: transform 0.5s ease;
}

.gift-box.opening .gift-box-lid {
    transform: translateX(-50%) rotateX(-100deg) translateY(-50px);
}

.gift-ribbon-h {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 25px;
    background: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.gift-ribbon-v {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 200px;
    background: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.gift-bow {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: #ffd700;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.gift-bow::before,
.gift-bow::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 50px;
    background: #ffd700;
    border-radius: 50%;
    top: 5px;
}

.gift-bow::before {
    left: -35px;
}

.gift-bow::after {
    right: -35px;
}

@keyframes gift-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes gift-shake {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(-10px) rotate(-5deg);
    }
    75% {
        transform: translateX(10px) rotate(5deg);
    }
}

.gift-instruction {
    margin-top: 40px;
    font-size: 32px;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6);
    font-weight: bold;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Gift Messages Screen */
.gift-messages-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 10007;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-messages-container {
    width: 90%;
    max-width: 800px;
    padding: 40px;
    text-align: center;
}

.gift-message {
    font-size: 36px;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6);
    font-weight: bold;
    line-height: 1.6;
    animation: message-fade-in 1s ease-out;
}

@keyframes message-fade-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Final End Screen */
.final-end-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(img/back.png) center no-repeat #000;
    z-index: 10008;
    display: flex;
    align-items: center;
    justify-content: center;
}

.final-end-container {
    text-align: center;
    width: 90%;
    max-width: 700px;
    padding: 40px 20px;
}

.final-end-text {
    font-size: 70px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
    font-weight: bold;
    margin-bottom: 30px;
    animation: glow 1.5s ease-in-out infinite;
}

.final-end-subtext {
    font-size: 32px;
    color: #C4515C;
    text-shadow: 0 0 10px #fff;
    margin-bottom: 15px;
    font-weight: bold;
}

.final-end-subtext2 {
    font-size: 36px;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    margin-bottom: 50px;
    font-weight: bold;
    animation: pulse 1.5s ease-in-out infinite;
}

.final-end-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.final-end-btn {
    padding: 25px 45px;
    font-size: 28px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(110, 80, 20, .4),
        inset 0 -2px 5px 1px rgba(139, 66, 8, 1),
        inset 0 -1px 1px 3px rgba(250, 227, 133, 1);
    background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07);
    border: 1px solid #a55d07;
    color: rgb(120, 50, 5);
    text-shadow: 0 2px 2px rgba(250, 227, 133, 1);
}

.final-end-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.final-end-btn:active {
    transform: scale(0.95);
}

.close-btn {
    background-image: linear-gradient(160deg, #a50707, #b41111, #fea2a2, #bc1b1b, #a50707);
}

.restart-btn {
    background-image: linear-gradient(160deg, #07a54e, #11b47e, #a2fef1, #1bbc88, #07a54e);
}

/* Responsive Styles for Gift Section */
@media (max-width: 768px) {
    .gift-surprise-title {
        font-size: 44px;
        margin-bottom: 50px;
    }

    .gift-box {
        width: 160px;
        height: 160px;
    }

    .gift-box-body {
        width: 140px;
        height: 110px;
    }

    .gift-box-lid {
        width: 160px;
        height: 35px;
    }

    .gift-ribbon-h {
        width: 160px;
        height: 20px;
    }

    .gift-ribbon-v {
        width: 20px;
        height: 160px;
    }

    .gift-bow {
        width: 50px;
        height: 50px;
    }
    
    .gift-instruction {
        margin-top: 35px;
        font-size: 28px;
    }

    .gift-message {
        font-size: 26px;
        line-height: 1.5;
    }

    .final-end-text {
        font-size: 52px;
        margin-bottom: 25px;
    }

    .final-end-subtext {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .final-end-subtext2 {
        font-size: 28px;
        margin-bottom: 45px;
    }

    .final-end-btn {
        padding: 20px 38px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .gift-surprise-title {
        font-size: 32px;
        margin-bottom: 35px;
    }

    .gift-box {
        width: 130px;
        height: 130px;
    }

    .gift-box-body {
        width: 110px;
        height: 88px;
    }

    .gift-box-lid {
        width: 130px;
        height: 28px;
    }

    .gift-ribbon-h {
        width: 130px;
        height: 16px;
    }

    .gift-ribbon-v {
        width: 16px;
        height: 130px;
    }

    .gift-bow {
        width: 40px;
        height: 40px;
        top: -15px;
    }

    .gift-bow::before,
    .gift-bow::after {
        width: 30px;
        height: 40px;
        top: 3px;
    }
    
    .gift-bow::before {
        left: -28px;
    }
    
    .gift-bow::after {
        right: -28px;
    }
    
    .gift-instruction {
        margin-top: 30px;
        font-size: 24px;
    }

    .gift-message {
        font-size: 20px;
        padding: 25px 15px;
        line-height: 1.6;
    }

    .final-end-container {
        padding: 30px 15px;
    }

    .final-end-text {
        font-size: 38px;
        margin-bottom: 20px;
    }

    .final-end-subtext {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .final-end-subtext2 {
        font-size: 24px;
        margin-bottom: 35px;
    }

    .final-end-buttons {
        flex-direction: column;
        gap: 18px;
    }

    .final-end-btn {
        padding: 18px 30px;
        font-size: 19px;
        width: 100%;
    }
}


/* Video Player Screen */
.video-player-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 10009;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.birthday-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
}

/* Ensure full video view on mobile - no cropping */
@media (max-width: 768px) {
    .video-player-screen {
        width: 100vw;
        height: 100vh;
    }
    
    .birthday-video {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
        position: relative;
    }
}
