/* =====================================================
   GENERAL
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family:
        "Georgia",
        "Times New Roman",
        serif;

    background:
        radial-gradient(
            circle at top,
            #174d38,
            #09291e 45%,
            #03150f 100%
        );

    color: #ffffff;

    overflow-x: hidden;
}


/* =====================================================
   FIREWORK CANVAS
===================================================== */

#fireworksCanvas {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 1;
}


/* =====================================================
   BACKGROUND GLOW
===================================================== */

.background-glow {
    position: fixed;

    width: 300px;
    height: 300px;

    border-radius: 50%;

    filter: blur(100px);

    opacity: 0.15;

    pointer-events: none;

    z-index: 0;
}

.glow-one {
    background: #5cffb0;
    top: -100px;
    left: -100px;
}

.glow-two {
    background: #00ff88;
    bottom: -100px;
    right: -100px;
}

.glow-three {
    background: #9dffce;
    top: 40%;
    left: 50%;
}


/* =====================================================
   SCREEN SYSTEM
===================================================== */

.screen {
    position: relative;

    min-height: 100vh;
    min-height: 100svh;

    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 25px;

    z-index: 5;
}

.hidden {
    display: none !important;
}

.screen.active {
    display: flex;
}


/* =====================================================
   LOCK SCREEN
===================================================== */

.lock-container {
    width: min(430px, 100%);

    padding: 45px 25px;

    text-align: center;

    border: 1px solid rgba(180, 255, 215, 0.2);

    background:
        linear-gradient(
            145deg,
            rgba(34, 116, 80, 0.35),
            rgba(4, 35, 25, 0.65)
        );

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    border-radius: 35px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px rgba(255,255,255,0.15);
}

.lock-icon {
    font-size: 65px;

    margin-bottom: 20px;

    filter:
        drop-shadow(
            0 0 15px rgba(91, 255, 174, 0.5)
        );

    animation: floatingLock 3s ease-in-out infinite;
}

@keyframes floatingLock {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

}

.small-title {
    color: #a8f5c8;

    letter-spacing: 2px;

    font-size: 13px;

    text-transform: uppercase;

    margin-bottom: 12px;
}

.lock-container h1 {
    font-size: clamp(32px, 8vw, 50px);

    margin-bottom: 15px;

    font-weight: 500;
}

.lock-description {
    color: #c4e9d5;

    font-family: Arial, sans-serif;

    font-size: 14px;

    margin-bottom: 35px;
}


/* =====================================================
   SLIDER
===================================================== */

.slider {
    position: relative;

    width: 100%;
    max-width: 350px;

    height: 68px;

    margin: auto;

    background:
        rgba(0, 0, 0, 0.28);

    border:
        1px solid rgba(160, 255, 200, 0.2);

    border-radius: 50px;

    overflow: hidden;

    user-select: none;
}

.slider-track {
    position: absolute;

    inset: 0;

    display: flex;

    justify-content: center;
    align-items: center;

    color: rgba(220,255,235,0.6);

    font-family: Arial, sans-serif;

    font-size: 14px;

    letter-spacing: 1px;
}

.slider-button {
    position: absolute;

    top: 5px;
    left: 5px;

    width: 58px;
    height: 58px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #b9ffd5,
            #3be58e
        );

    color: #073a25;

    display: flex;

    justify-content: center;
    align-items: center;

    font-size: 25px;

    font-family: Arial, sans-serif;

    font-weight: bold;

    cursor: grab;

    box-shadow:
        0 5px 20px rgba(60, 255, 155, 0.35);

    z-index: 3;

    touch-action: none;
}

.slider-button:active {
    cursor: grabbing;
}


/* =====================================================
   PIN SCREEN
===================================================== */

.pin-container {
    width: min(390px, 100%);

    text-align: center;

    padding: 35px 20px;

    border-radius: 35px;

    background:
        rgba(7, 45, 31, 0.65);

    border:
        1px solid rgba(160, 255, 200, 0.2);

    backdrop-filter: blur(25px);

    box-shadow:
        0 30px 80px rgba(0,0,0,0.45);
}

.mini-lock {
    font-size: 45px;

    margin-bottom: 12px;
}

.pin-container h2 {
    font-size: 28px;

    margin-bottom: 8px;

    font-weight: 500;
}

.pin-container p {
    font-family: Arial, sans-serif;

    color: #bcead0;

    margin-bottom: 22px;
}


/* PIN dots */

.pin-dots {
    display: flex;

    justify-content: center;

    gap: 15px;

    margin-bottom: 20px;
}

.pin-dots span {
    width: 13px;
    height: 13px;

    border-radius: 50%;

    border:
        1px solid #a8f5c8;

    transition: 0.2s;
}

.pin-dots span.filled {
    background: #8dffc0;

    box-shadow:
        0 0 12px rgba(93,255,174,0.8);
}

#pinError {
    opacity: 0;

    color: #b7ffd3;

    font-family: Arial, sans-serif;

    font-size: 13px;

    height: 20px;

    transition: 0.3s;
}

#pinError.show {
    opacity: 1;
}


/* Keypad */

.keypad {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    max-width: 280px;

    margin: auto;
}

.key {
    width: 70px;
    height: 70px;

    margin: auto;

    border-radius: 50%;

    border:
        1px solid rgba(190,255,215,0.2);

    background:
        rgba(255,255,255,0.07);

    color: white;

    font-size: 22px;

    cursor: pointer;

    transition: 0.2s;
}

.key:hover {
    background:
        rgba(120,255,175,0.2);

    transform: scale(1.05);
}

.key:active {
    transform: scale(0.92);

    background:
        rgba(130,255,185,0.3);
}

.key.empty {
    visibility: hidden;
}

.delete {
    font-size: 20px;
}


/* =====================================================
   VIDEO
===================================================== */

.video-container {
    width: min(950px, 100%);

    text-align: center;
}

.video-top-text {
    color: #a9f5c7;

    font-family: Arial, sans-serif;

    letter-spacing: 2px;

    text-transform: uppercase;

    font-size: 12px;

    margin-bottom: 15px;
}

.video-container h1 {
    font-size: clamp(32px, 7vw, 65px);

    font-weight: 500;

    margin-bottom: 30px;
}

.video-container h1 span {
    display: block;

    color: #9bffc5;
}

.video-wrapper {
    width: 100%;

    max-width: 900px;

    margin: auto;

    border-radius: 25px;

    overflow: hidden;

    border:
        1px solid rgba(170,255,205,0.25);

    box-shadow:
        0 25px 80px rgba(0,0,0,0.5);

    background: #000;
}

.video-wrapper video {
    display: block;

    width: 100%;

    max-height: 70vh;

    object-fit: contain;

    background: #000;
}

.video-bottom-text {
    margin-top: 20px;

    color: #b7dec7;

    font-family: Arial, sans-serif;

    font-size: 13px;
}

#skipVideo {
    margin-top: 20px;

    padding: 12px 22px;

    border: 1px solid rgba(180,255,210,0.3);

    border-radius: 30px;

    background: rgba(255,255,255,0.08);

    color: white;

    cursor: pointer;

    font-family: Arial, sans-serif;
}


/* =====================================================
   PHOTO SECTION
===================================================== */

#photosScreen {
    align-items: flex-start;

    padding-top: 60px;
    padding-bottom: 80px;
}

.photos-content {
    width: 100%;

    text-align: center;
}

.memory-small {
    color: #9bf7be;

    font-family: Arial, sans-serif;

    text-transform: uppercase;

    letter-spacing: 2px;

    font-size: 11px;
}

.photos-content h1 {
    font-size: clamp(35px, 8vw, 65px);

    font-weight: 500;

    margin-top: 10px;
}

.memory-text {
    color: #b8ddc7;

    font-family: Arial, sans-serif;

    font-size: 14px;

    margin-top: 10px;
}


/* =====================================================
   ORBIT
===================================================== */

.orbit-area {

    position: relative;

    width: min(650px, 90vw);

    height: min(650px, 90vw);

    margin: 50px auto;

    display: flex;

    justify-content: center;
    align-items: center;
}


/* Orbit circles */

.orbit-ring {
    position: absolute;

    border:
        1px solid rgba(150,255,190,0.15);

    border-radius: 50%;

    pointer-events: none;
}

.ring-one {
    width: 62%;
    height: 62%;
}

.ring-two {
    width: 88%;
    height: 88%;

    border-style: dashed;

    animation:
        ringRotate 25s linear infinite;
}

@keyframes ringRotate {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* Center */

.orbit-center {
    position: absolute;

    width: 145px;
    height: 145px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            #3cbb7c,
            #0a4930
        );

    border:
        1px solid rgba(200,255,220,0.3);

    display: flex;

    flex-direction: column;

    justify-content: center;
    align-items: center;

    box-shadow:
        0 0 60px rgba(75,255,160,0.18);
}

.heart {
    color: #c2ffdc;

    font-size: 38px;

    animation:
        heartbeat 1.5s infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.18);
    }

}

.orbit-center p {
    margin-top: 5px;

    font-family: Arial, sans-serif;

    font-size: 11px;

    letter-spacing: 4px;

    color: #d8ffe7;
}


/* =====================================================
   PHOTO ORBIT
===================================================== */

.photo-orbit {
    position: absolute;

    width: 100%;
    height: 100%;

    animation:
        orbitRotation 25s linear infinite;
}

@keyframes orbitRotation {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* Individual photos */

.orbit-photo {
    position: absolute;

    width: clamp(75px, 16vw, 120px);

    height: clamp(75px, 16vw, 120px);

    padding: 5px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #d8ffe8,
            #4ad98e
        );

    box-shadow:
        0 10px 30px rgba(0,0,0,0.4),
        0 0 25px rgba(91,255,170,0.2);

    overflow: hidden;

    animation:
        counterRotation 25s linear infinite;
}

.orbit-photo img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    border-radius: 50%;

    border:
        2px solid rgba(255,255,255,0.6);
}


/* Counter rotation keeps photos upright */

@keyframes counterRotation {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }

}


/* Position photos */

.photo-1 {
    top: 0;
    left: 50%;

    transform: translateX(-50%);
}

.photo-2 {
    top: 13%;
    right: 9%;
}

.photo-3 {
    bottom: 13%;
    right: 9%;
}

.photo-4 {
    bottom: 0;
    left: 50%;

    transform: translateX(-50%);
}

.photo-5 {
    bottom: 13%;
    left: 9%;
}

.photo-6 {
    top: 13%;
    left: 9%;
}


/* =====================================================
   FINAL MESSAGE
===================================================== */

.final-message {
    width: min(650px, 90%);

    margin: 20px auto 0;

    padding: 35px 25px;

    border-radius: 30px;

    background:
        rgba(15,70,46,0.35);

    border:
        1px solid rgba(180,255,210,0.15);

    backdrop-filter: blur(15px);
}

.final-message h2 {
    color: #b7ffd2;

    font-size: clamp(25px, 6vw, 38px);

    font-weight: 500;

    margin-bottom: 20px;
}

.final-message p {
    color: #d1eadd;

    font-family: Arial, sans-serif;

    font-size: 14px;

    line-height: 1.8;

    margin-bottom: 15px;
}

.forever {
    margin-top: 25px;

    color: #8effbb;

    font-size: 20px;

    font-style: italic;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 700px) {

    .screen {
        padding: 18px;
    }

    .lock-container {
        padding: 35px 20px;
    }

    .key {
        width: 62px;
        height: 62px;
    }

    .orbit-area {
        margin-top: 35px;
    }

    .orbit-center {
        width: 110px;
        height: 110px;
    }

    .heart {
        font-size: 30px;
    }

}


/* =====================================================
   SMALL PHONES
===================================================== */

@media (max-width: 400px) {

    .lock-icon {
        font-size: 52px;
    }

    .lock-container h1 {
        font-size: 34px;
    }

    .slider {
        height: 62px;
    }

    .slider-button {
        width: 52px;
        height: 52px;
    }

    .key {
        width: 58px;
        height: 58px;
    }

    .keypad {
        gap: 9px;
    }

    .orbit-area {
        width: 92vw;
        height: 92vw;
    }

    .orbit-center {
        width: 95px;
        height: 95px;
    }

}


/* =====================================================
   LANDSCAPE PHONES
===================================================== */

@media (max-height: 550px) and (orientation: landscape) {

    .screen {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .lock-container {
        padding: 20px;
    }

    .lock-icon {
        font-size: 40px;
        margin-bottom: 5px;
    }

    .key {
        width: 48px;
        height: 48px;
    }

}


/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}