/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================= BODY ================= */
body {
    background-color: #0d0d0d;
    color: white;
    font-family: monospace;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    text-align: center;
}

/* ================= LOGIN CONTAINER ================= */
.container {
    width: 100%;
    height: 100vh;
    z-index: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    background: url("https://res.cloudinary.com/dn0250gby/image/upload/v1776500922/osmany-m-leyva-aldana-X_CAX3tFlkw-unsplash_tbanfp.jpg") no-repeat center center;
    background-size: cover;

    position: relative;
}
.container h1 {
    font-size: 42px;     /* 🔥 bigger */
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
}
.container p {
    font-size: 14px;   /* ↓ yari nini cyane */
    opacity: 0.8;
}
    

h1 {
    color: #00ffcc;
}

.container::before {
    content: "";
    z-index: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    top: 0;
    left: 0;
}

.container * {
    position: relative;
    z-index: 2;
}

input {
    padding: 12px;
    margin: 10px 0;
    width: 60%;
    max-width: 250px;
    border-radius: 8px;
    border: 1px solid #00ffcc;
    background: black;
    color: white;
    font-size: 14px;
}
input:focus {
    outline: none;
    border: 1px solid #00ffee;
    box-shadow: 0 0 10px #00ffee;
}

/* ================= BUTTON ================= */
button {
    margin-top: 15px;
    padding: 16px 30px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, #00ffcc, #0099ff);
    color: black;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    width: 60%;
    max-width: 220px;
}
button:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #0099ff, #00ffcc);
}

button:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #00ffee, #00aaff);
}

#error {
    color: red;
    margin-top: 10px;
}

/* ================= GENERAL ================= */
.section {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ================= HOME ================= */
.hero {
    width: 100%;
    min-height: 100vh;
    text-align: center;
    align-items: center;
    background: url("https://res.cloudinary.com/dn0250gby/image/upload/v1775908260/artem-artemov-DVx3R5ulLtU-unsplash_n3tpuw.jpg") center/cover no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    top: 0;
    left: 0;
}

.hero * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 45px;
    color: #00ffcc;
}

.hero p {
    font-size: 20px;
    margin-top: 15px;
    max-width: 500px;
}

/* ================= STORY LIST ================= */
#story {
    min-height: 100vh;
    background:
    linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.95)),
    url("https://res.cloudinary.com/dn0250gby/image/upload/v1776500913/danny-messina-red-velvet-ag-Ezgx9WdakNw-unsplash_exjqok.jpg");
    background-size: cover;
    background-position: center;
    flex-direction: column;
    padding: 20px;
}

/* ===== CHAPTER GRID ===== */
.chapter-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    width: 95%;
    max-width: 900px;
    margin-top: 20px;
}

/* ===== CARD ===== */
.chapter-card {
    background: #111;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.4s;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.chapter-card:hover {
    transform: scale(1.07);
    box-shadow: 0 15px 35px rgba(0,255,204,0.2);
}

/* IMAGE */
.chapter-img {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    transition: 0.5s;
}

.chapter-card:hover .chapter-img {
    transform: scale(1.1);
}

/* TEXT */
.chapter-info {
    padding: 12px;
}

.chapter-info h3 {
    color: #00ffcc;
    margin: 0;
    font-size: 16px;
}

.chapter-info p {
    font-size: 13px;
    color: #aaa;
    margin-top: 5px;
}

/* ================= CHAPTER PAGE ================= */
#chapterPage {
    width: 100%;
    height: 100vh;
    background: url("https://res.cloudinary.com/dn0250gby/image/upload/v1775908260/artem-artemov-DVx3R5ulLtU-unsplash_n3tpuw.jpg") center/cover no-repeat;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#chapterPage::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}


#chapterTitle {
    font-size: 32px;
    color: #00ffcc;
    text-align: center;
    margin-bottom: 10px;
}

/* ================= BIRTHDAY ================= */
.card p {
    font-size: 22px;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

.hero h1 { font-size: 38px; }
.hero p { font-size: 20px; }

#chapterTitle { font-size: 24px; }

button { font-size: 16px; }
}

/* ================= BACK BUTTON ================= */
.chapter-box {
    width: 95%;
    max-width: 700px;
    height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    position: relative;
}

.chapter-box button {
    position: fixed;
    bottom: 40px;
    left: 20px;

    padding: 12px 20px;
    border-radius: 25px;
    background: #00ffcc;
    color: black;
    border: none;
    font-weight: bold;
    z-index: 1000;
        }
#chapterText {
    font-size: 30px;
    line-height: 2.2;
    max-width: 95%;
    margin: auto;
    margin-top: 15px;
    text-align: left;
    overflow-y: auto;
    max-height: 70vh;
    padding: 18px;
}
.btn-group {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================= BIRTHDAY EXPERIENCE ================= */

#birthday {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.9)),
    url("https://res.cloudinary.com/dn0250gby/image/upload/v1776500912/mishal-ibrahim-iP0fI4NPMTk-unsplash_miiue8.jpg");

    background-size: cover;
    background-position: center;

    animation: fadeIn 1s ease;
}

/* TEXT */
#birthday h1 {
    font-size: 38px;
    color: #ff4d88;
    animation: slideDown 1s ease;
}

#birthday p {
    max-width: 500px;
    font-size: 18px;
    opacity: 0.9;
    animation: fadeIn 2s ease;
}

/* BUTTON */
#birthday button {
    margin-top: 15px;
}

/* ================= ANIMATIONS ================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.birthday-content {
    animation: fadeIn 1s ease;
}

/* ===== BIRTHDAY GALLERY ===== */
.birthday-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    width: 90%;
    margin: auto;
    margin-top: 20px;
}

.birthday-gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    transition: 0.4s;
}

.birthday-gallery img:hover {
    transform: scale(1.05);
}

/* ===== MESSAGE ===== */
.birthday-message {
    margin-top: 20px;
    text-align: center;
}

.birthday-message h1 {
    color: #ff4d88;
    font-size: 32px;
}
/* ===== HEADER ===== */
.birthday-header {
    margin-top: 20px;
    text-align: center;
}

.birthday-header h1 {
    font-size: 40px;
    color: #ff4d88;
    animation: fadeIn 1.5s ease;
}

.birthday-header p {
    opacity: 0.8;
    margin-top: 5px;
}

/* ===== GALLERY ===== */
.birthday-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    width: 90%;
    margin-top: 20px;
}
/* 🔥 TITLE HEJURU YA SCREEN */
.birthday-title {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);

    text-align: center;
    font-size: 26px;
    font-weight: bold;

    color: #ff4d88;
    text-shadow: 0 0 10px black;

    z-index: 9999;
    animation: fadeSlide 2s ease;
}

.birthday-gallery img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    transition: 0.5s;
}

.birthday-gallery img:hover {
    transform: scale(1.08);
    box-shadow: 0 0 15px #ff4d88;
}

/* ===== MESSAGE ===== */
.birthday-message {
    margin-top: 25px;
    padding: 15px;
    max-width: 500px;
}

.birthday-message h2 {
    color: #00ffcc;
    margin-bottom: 10px;
}

#birthdayText {
    font-size: 30px;
    line-height: 2.2;
    font-weight: 500;

    width: 100%;
    max-width: 700px;

    margin: auto;
    margin-top: 20px;

    padding: 20px;

    text-align: left;

    white-space: pre-line;

    overflow-y: auto;
    max-height: 70vh;
}

/* ===== BACK BUTTON ===== */
.back-btn {
    margin-top: 20px;
    font-size: 14px;
    padding: 10px 20px;
}
/* ===== SLIDER ===== */
.slider {
    width: 90%;
    max-width: 400px;
    margin: 20px auto;
}

.slider img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    z-index: 0;
}

/* FINAL SECTION */
.birthday-final {
    text-align: center;
    animation: fadeIn 1s ease;
}
html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto; /* ✅ FIX */
}
.birthday-full {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}
.birthday-full img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}
.birthday-full .slider img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    transition: opacity 1s ease;
}
.birthday-full::after {
    display: none;
}
.controls {
    position: fixed; /* 🔥 FIX */
    bottom: 40px;
    left: 0;
    width: 100%;

    display: flex;
    justify-content: space-between;
    padding: 0 20px;

    z-index: 99999;
}

.controls button {
    position: relative;
    padding: 12px 18px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 10;
}
.final-message-page {
    height: 100vh;
    width: 100vw;
    background: url("https://res.cloudinary.com/dn0250gby/image/upload/v1776513368/charlesdeluvio-pcZvxrAyYoQ-unsplash_vwzzm7.jpg") center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.message-box {
    width: 95%;
    max-width: 700px;
    margin: auto;
    padding: 20px;
}

#finalText {
    font-size: 30px;
    line-height: 2.2;
    max-width: 95%;
    margin: auto;
    margin-top: 15px;
    text-align: left;
    overflow-y: auto;
    max-height: 70vh;
    padding: 18px;
        }
/* 🔥 FINAL MESSAGE BUTTON (RIGHT SIDE) */
.final-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 25px;
    background: linear-gradient(45deg, #ff4d88, #ff99cc); /* ✅ gusa */
    color: white;
    border: none;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255,77,136,0.6);
    z-index: 9999;
}

/* 🔥 BACK BUTTON (LEFT SIDE) */
.back-btn-fixed {
    position: fixed;
    bottom: 80px;
    left: 20px;
    background: linear-gradient(45deg, #00ffcc, #66ffe0);
    box-shadow: 0 0 15px rgba(0,255,204,0.6);
    padding: 12px 20px;
    border-radius: 25px;
    background: #00ffcc;
    color: black;
    border: none;
    font-weight: bold;

    z-index: 9999;
}
