* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top, #0b180b 0%, #050805 45%, #020402 100%);
    color: #9cff9c;
    font-family: monospace;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

/* ==============================
   GENERAL
============================== */

.hidden {
    display: none !important;
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==============================
   BOOT SCREEN
============================== */

.terminal {
    width: 100%;
    max-width: 600px;
    line-height: 2;
    font-size: 14px;
    padding: 25px;
    border: 1px solid #254425;
    background: rgba(5, 12, 5, 0.85);
    box-shadow:
        0 0 30px rgba(70, 255, 70, 0.08),
        inset 0 0 30px rgba(70, 255, 70, 0.03);
    position: relative;
}

.terminal::before {
    content: "SECURE TERMINAL // CONNECTION ENCRYPTED";
    display: block;
    color: #4d9d4d;
    font-size: 9px;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.green {
    color: #67ff67;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 20px;
    text-shadow: 0 0 12px rgba(103, 255, 103, 0.5);
}

.progress {
    width: 100%;
    height: 8px;
    background: #172117;
    margin: 25px 0;
    overflow: hidden;
    border: 1px solid #254425;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: #67ff67;
    box-shadow: 0 0 12px #67ff67;
    transition: width 0.2s;
}

#boot-status {
    color: #67ff67;
    letter-spacing: 2px;
}

/* ==============================
   HEADER
============================== */

header {
    max-width: 700px;
    margin: 0 auto 30px;
    border-bottom: 1px solid #254425;
    padding-bottom: 20px;
    position: relative;
}

header::after {
    content: "CLASSIFIED";
    position: absolute;
    right: 0;
    bottom: 8px;
    font-size: 9px;
    color: #ff6b6b;
    letter-spacing: 2px;
}

.top-secret {
    font-size: 11px;
    letter-spacing: 3px;
    color: #ff6b6b;
    opacity: 0.8;
}

.project {
    font-size: 24px;
    margin-top: 10px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(103, 255, 103, 0.25);
}

#codename {
    color: #67ff67;
}

/* ==============================
   PANELS
============================== */

.panel {
    max-width: 700px;
    margin: 15px auto;
    padding: 20px;
    border: 1px solid #254425;
    background: rgba(10, 20, 10, 0.8);
    box-shadow:
        0 0 20px rgba(70, 255, 70, 0.03),
        inset 0 0 20px rgba(70, 255, 70, 0.02);
    position: relative;
}

.panel::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 35px;
    height: 2px;
    background: #67ff67;
}

.panel-title {
    color: #67ff67;
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

/* ==============================
   PROFILE
============================== */

.profile p {
    margin: 12px 0;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.profile span {
    color: #4d9d4d;
}

/* ==============================
   STATS
============================== */

.stat {
    margin: 16px 0;
}

.stat span {
    display: block;
    margin-bottom: 6px;
}

.bar {
    height: 7px;
    background: #182218;
    border: 1px solid #254425;
}

.bar div {
    height: 100%;
    background: #67ff67;
    box-shadow: 0 0 8px rgba(103, 255, 103, 0.5);
}

/* ==============================
   WARNING
============================== */

.warning {
    color: #ff9b6b;
    margin-top: 20px;
    font-size: 12px;
}

/* ==============================
   MEMORY FILES
============================== */

.file {
    width: 100%;
    background: rgba(5, 15, 5, 0.7);
    border: 1px solid #254425;
    color: #9cff9c;
    padding: 14px;
    margin-top: 10px;
    text-align: left;
    font-family: monospace;
    cursor: pointer;
    transition: 0.2s;
}

.file span {
    float: right;
    opacity: 0.6;
}

.file:hover {
    background: #102010;
    border-color: #67ff67;
    transform: translateX(3px);
}

.locked {
    color: #ffb36b;
}

/* ==============================
   BUTTONS
============================== */

.close-btn,
.action-btn {
    border: 1px solid #67ff67;
    background: transparent;
    color: #67ff67;
    padding: 12px 18px;
    margin-top: 18px;
    font-family: monospace;
    cursor: pointer;
    transition: 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.close-btn:hover,
.action-btn:hover {
    background: #67ff67;
    color: #050805;
    box-shadow: 0 0 15px rgba(103, 255, 103, 0.35);
}

.close-btn:active,
.action-btn:active,
.file:active {
    transform: scale(0.97);
}

/* ==============================
   SECRET INPUT
============================== */

#secret-input {
    width: 100%;
    padding: 14px;
    background: #050805;
    border: 1px solid #254425;
    color: #9cff9c;
    font-family: monospace;
    outline: none;
    font-size: 16px;
    border-radius: 0;
}

#secret-input:focus {
    border-color: #67ff67;
    box-shadow: 0 0 12px rgba(103, 255, 103, 0.15);
}

#secret-result {
    margin-top: 15px;
}

/* ==============================
   FINAL
============================== */

.final {
    max-width: 700px;
    margin: 60px auto;
    text-align: center;
    padding: 30px 15px;
    animation: finalReveal 1s ease;
}

.access {
    color: #67ff67;
    letter-spacing: 4px;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(103, 255, 103, 0.6);
}

.final-line {
    font-size: 18px;
    color: #9cff9c;
}

.final-name {
    font-size: 30px;
    margin: 25px 0;
    color: #67ff67;
    text-shadow: 0 0 15px rgba(103, 255, 103, 0.5);
}

.birthday {
    font-size: 34px;
    margin: 30px 0;
    animation: heartbeat 1.8s infinite;
}

.message {
    max-width: 600px;
    margin: auto;
    line-height: 2;
    color: #d3ffd3;
}

/* ==============================
   ANIMATIONS
============================== */

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

@keyframes finalReveal {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================
   MOBILE / IPHONE
============================== */

@media (max-width: 600px) {

    body {
        padding: 12px;
    }

    .terminal {
        padding: 18px;
        font-size: 12px;
    }

    .green {
        font-size: 20px;
    }

    header {
        margin-bottom: 20px;
    }

    .project {
        font-size: 19px;
    }

    .panel {
        padding: 16px;
        margin: 12px auto;
    }

    .profile p {
        font-size: 12px;
    }

    .birthday {
        font-size: 27px;
    }

    .final-name {
        font-size: 25px;
    }

    .message {
        font-size: 14px;
    }

    .file,
    .action-btn,
    .close-btn {
        min-height: 48px;
    }
}

/* ==================================================
   FINAL ACCESS ANIMATION
   ================================================== */

#final-panel {
    animation: finalReveal 1.2s ease forwards;
}

@keyframes finalReveal {

    0% {
        opacity: 0;
        transform: scale(0.94);
    }

    60% {
        opacity: 1;
        transform: scale(1.02);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* ==================================================
   ACCESS GRANTED GLITCH
   ================================================== */

.access {
    animation:
        accessPulse 1.5s ease-in-out infinite;
}

@keyframes accessPulse {

    0%,
    100% {
        opacity: 1;
        transform: translateX(0);
    }

    20% {
        opacity: 0.8;
        transform: translateX(-1px);
    }

    22% {
        opacity: 1;
        transform: translateX(1px);
    }

    24% {
        transform: translateX(0);
    }
}


/* ==================================================
   BIRTHDAY GLOW
   ================================================== */

.birthday {
    animation:
        birthdayGlow 2s ease-in-out infinite;
}

@keyframes birthdayGlow {

    0%,
    100% {
        text-shadow:
            0 0 5px rgba(103, 255, 103, 0.2);
    }

    50% {
        text-shadow:
            0 0 12px rgba(103, 255, 103, 0.7);
    }
}


/* ==================================================
   FINAL MESSAGE
   ================================================== */

.message {
    animation:
        messageReveal 1.5s ease forwards;
}

@keyframes messageReveal {

    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==================================================
   MOBILE OPTIMIZATION
   ================================================== */

@media (max-width: 600px) {

    #final-panel {
        padding-top: 40px;
    }

    .access {
        letter-spacing: 3px;
    }

    .birthday {
        text-shadow:
            0 0 8px rgba(103, 255, 103, 0.5);
    }
}

.final-reveal {
    animation: finalReveal 1.2s ease forwards;
}

/* ==================================================
   MEMORY DECRYPTION
   ================================================== */

#memory-text {
    min-height: 50px;
    line-height: 1.9;
    transition:
        opacity 0.3s ease,
        color 0.3s ease;
}

#memory-panel {
    animation: memoryOpen 0.4s ease;
}

@keyframes memoryOpen {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}