/* Cute Theme Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

:root {
    /* --- Palette: Cotton Candy & Marshmallow --- */
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --body-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);

    /* Cute Gradients */
    --gradient-primary: linear-gradient(to right, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --gradient-hover: linear-gradient(to right, #ff758c 0%, #ff7eb3 100%);
    --gradient-header: linear-gradient(60deg, #64b3f4 0%, #c2e59c 100%);

    /* Colors */
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.7);
    --text-main: #59598d;   /* Soft Purple-Grey */
    --text-light: #8e8eac;
    --accent: #ff9a9e;      /* Soft Pink */
    --danger: #ff6b6b;      /* Soft Red */
    --success: #51cf66;     /* Soft Green */

    /* Borders & Shadows */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow-soft: 0 10px 25px rgba(158, 158, 176, 0.15);
    --shadow-hover: 0 15px 35px rgba(158, 158, 176, 0.25);

    /* Motion tokens (shared easing/durations for consistent, smooth animation) */
    --ease-out: cubic-bezier(.25, .8, .25, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    --dur-fast: .15s;
    --dur: .25s;
    --dur-slow: .45s;
}

/* Accessibility: honor reduced-motion everywhere (one global guard). */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Quicksand', sans-serif; /* The "Cute" Font */
}

body {
    background-image: linear-gradient(to top, #fad0c4 0%, #ffd1ff 100%); /* Pastel Sunset */
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Global Button Styles */
.btn, button {
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    border: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn:active {
    transform: scale(0.95);
}

/* ... existing styles ... */

/* ================= CUTE MODAL STYLES ================= */
/* Mechanism: visibility/opacity (no display toggling) so open/close animate
   cleanly with zero timer races — JS just toggles the `.open` class. */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.6); /* Milky glass */
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

.modal-overlay.open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.28s ease;
}

.modal-box {
    background: #ffffff;
    border: 3px solid #ff9a9e; /* Cute Pink Border */
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(255, 154, 158, 0.4); /* Pink Shadow */
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    color: var(--text-main);
}

.modal-overlay.open .modal-box {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2,
.modal-header h3 {
    font-size: 1.4rem;
    color: #ff6b6b; /* Soft Red */
    margin: 0;
}

.modal-close-btn {
    background: #f0f0f5;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.modal-close-btn:hover { background: #ff9a9e; color: white; }

.modal-body p {
    font-size: 1rem;
    line-height: 1.6;
    color: #7d7d9e;
    margin-bottom: 20px;
}

.steps-box {
    background: #fdfbfb;
    padding: 20px;
    border-radius: 16px;
    border: 2px dashed #c2e59c; /* Soft Green Dashes */
    margin-bottom: 20px;
    text-align: left;
}
.steps-box h3 { font-size: 1.1rem; color: #64b3f4; margin-bottom: 10px; }
.steps-box li { margin-bottom: 8px; font-size: 0.95rem; color: #7d7d9e; }
.steps-box a { color: #ff9a9e; text-decoration: none; font-weight: bold; }

/* Cute Warning Box */
.warning-box {
    background: #fff0f0;
    border-left: 5px solid #ff6b6b;
    padding: 15px;
    border-radius: 12px;
    color: #ff6b6b;
    font-size: 0.9rem;
    text-align: left;
    display: flex; gap: 10px; align-items: start;
}
.warning-icon { font-size: 1.2rem; }

.btn-secondary {
    background: #e0e0e0;
    color: #666;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.2s;
}
.btn-secondary:hover { background: #d0d0d0; }

/* ================= NOT-FOUND MODAL: contact the seller first ================= */
.modal-box--missing { max-width: 520px; }
.modal-box--missing .modal-header h2 { color: #d64550; }

.contact-box {
    background: #f6f9ff;
    border: 2px solid #dbe7ff;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 14px;
    text-align: left;
    display: grid; gap: 12px;
}
.contact-lead { font-weight: 700; color: var(--text-main); display: flex; gap: 8px; align-items: center; }
.contact-lead i { color: #6a82fb; }

.btn-contact {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 14px 18px; border-radius: 14px;
    background: linear-gradient(135deg, #6a82fb, #4facfe);
    color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none;
    box-shadow: 0 10px 22px rgba(106, 130, 251, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-contact:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(106, 130, 251, 0.38); color: #fff; }
.btn-contact:focus-visible { outline: 3px solid rgba(106, 130, 251, 0.45); outline-offset: 2px; }

.contact-steps { margin: 0; padding-left: 20px; color: #7d7d9e; font-size: 0.92rem; display: grid; gap: 4px; }

.ready-msg {
    background: #fff; border: 2px dashed #c9d6ff; border-radius: 12px; padding: 12px;
    display: grid; gap: 10px;
}
.ready-msg-text { font-size: 0.92rem; color: var(--text-main); line-height: 1.5; font-family: 'Courier New', monospace; word-break: break-word; }
.copy-msg-btn {
    justify-self: end; background: #eef2ff; color: #6a82fb; border: 0; border-radius: 10px;
    padding: 8px 12px; font-weight: 700; font-size: 0.85rem; cursor: pointer; font-family: inherit;
    display: inline-flex; align-items: center; gap: 6px; transition: background 0.2s ease, color 0.2s ease;
}
.copy-msg-btn:hover { background: #6a82fb; color: #fff; }
.copy-msg-btn.copied { background: #e3f8ee; color: #2f9e6e; }

.contact-note { font-size: 0.85rem; color: var(--text-light); display: flex; gap: 8px; align-items: start; }
.contact-note i { color: #6a82fb; margin-top: 3px; }

.self-serve { text-align: left; margin-bottom: 6px; }
.self-serve summary {
    cursor: pointer; font-weight: 700; color: #64b3f4; font-size: 0.95rem; padding: 8px 4px;
    list-style: none; display: flex; align-items: center; gap: 8px;
}
.self-serve summary::-webkit-details-marker { display: none; }
.self-serve summary::after { content: '\25BE'; margin-left: auto; color: #b4b4c8; transition: transform 0.2s ease; }
.self-serve[open] summary::after { transform: rotate(180deg); }
.self-serve .steps-box { margin-top: 8px; margin-bottom: 12px; }


/* ================= CUTE FALLBACK (MAGIC LINK) STYLES ================= */
.fallback-box {
    margin-top: 20px;
    padding: 20px;
    /* Magical Gradient */
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(161, 140, 209, 0.4);
    animation: popIn 0.5s ease;
    color: white;
    text-align: center;
}

.fallback-header {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 1.05rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.link-copy-area {
    background: rgba(255, 255, 255, 0.9);
    border: 2px dashed #fff;
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    transition: all 0.2s;
    color: #a18cd1;
}

.link-copy-area:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.link-text-display {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    width: 100%; text-align: left;
    margin-right: 10px;
}

/* Netflix sign-in code: show it big and spaced-out, centered */
.link-copy-area.is-code .link-text-display {
    font-size: 2rem; font-weight: 800; letter-spacing: 0.4em;
    text-align: center; color: #e50914;
}

.copy-badge {
    background: #ff9a9e;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

/* Success State */
.link-copy-area.copied {
    border-color: #51cf66;
    background: #f0fff4;
    color: #51cf66;
}
.link-copy-area.copied .copy-badge { background: #51cf66; }

.fallback-footer {
    margin-top: 10px; font-size: 0.85rem; opacity: 0.9;
}

/* ================= SUCCESS TOAST ================= */
.success-toast {
    position: fixed;
    top: -100px; /* Start hidden above the screen */
    left: 50%;
    transform: translateX(-50%);
    background: #51cf66; /* Cute Theme Success Green */
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    box-shadow: 0 15px 40px rgba(81, 207, 102, 0.35);
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none; /* Let clicks pass through */
}

.success-toast.show {
    top: 30px; /* Drop down into view */
}

.success-toast i {
    font-size: 1.2rem;
}


/* ... existing styles ... */

/* ================= NOT RECEIVED BUTTON ================= */
.btn-not-received {
    margin-top: 15px;
    background: transparent;
    border: 2px dashed rgba(255, 154, 158, 0.6); /* Dashed Pink Border */
    color: #ff6b6b;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer;
}

.btn-not-received:hover {
    background: rgba(255, 154, 158, 0.1);
    border-color: #ff6b6b;
    transform: translateY(-2px);
}

.btn-not-received i {
    font-size: 1rem;
}

/* ... [Previous CSS Content] ... */

/* ================= ADMIN NAVIGATION BAR ================= */
.admin-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    background: white;
    padding: 15px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: fit-content;
    margin-left: auto; margin-right: auto;
}

.nav-item {
    text-decoration: none;
    color: #8888a0;
    font-weight: 700;
    padding: 10px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex; align-items: center; gap: 8px;
    font-size: 0.95rem;
}

.nav-item i { font-size: 1.1rem; }

.nav-item:hover {
    background: #f0f0f5;
    color: #6a82fb;
}

.nav-item.active {
    background: linear-gradient(135deg, #6a82fb, #8b5cf6);
    color: white;
    box-shadow: 0 5px 15px rgba(106, 130, 251, 0.3);
}

.nav-item.logout {
    color: #ff6b6b;
}
.nav-item.logout:hover {
    background: #fff0f0;
}