/* ============================================================
   SINCROPAREJAS — NOIR COSMOS PREMIUM UI
   Merged: original agent logic styles + redesign
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── TOKENS ── */
:root {
    --bg-color: #060608;
    --card-bg: rgba(255, 255, 255, 0.035);
    --card-border: rgba(255, 255, 255, 0.08);

    --surface: rgba(255, 255, 255, 0.035);
    --surface-md: rgba(255, 255, 255, 0.065);
    --surface-hi: rgba(255, 255, 255, 0.10);
    --border: rgba(255, 255, 255, 0.07);
    --border-glow: rgba(180, 140, 255, 0.2);

    --primary-gradient: linear-gradient(135deg, #c9a9ff 0%, #ff8fab 100%);
    --primary-color: #c9a9ff;
    --primary: #c9a9ff;
    --primary-dim: rgba(201, 169, 255, 0.15);
    --accent: #ff8fab;
    --accent-dim: rgba(255, 143, 171, 0.12);
    --gold: #e8c87a;

    --c-red: #f43f5e;
    --c-green: #10b981;
    --c-blue: #3b82f6;
    --c-purple: #8b5cf6;
    --c-pink: #ec4899;

    --text-primary: rgba(255, 255, 255, 0.92);
    --text-secondary: rgba(255, 255, 255, 0.48);
    --text-1: rgba(255, 255, 255, 0.92);
    --text-2: rgba(255, 255, 255, 0.52);
    --text-3: rgba(255, 255, 255, 0.28);

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 40px;

    --font-main: 'DM Sans', sans-serif;
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'DM Sans', sans-serif;

    --shadow-card: 0 4px 40px rgba(0, 0, 0, 0.55), 0 1px 0 var(--border) inset;
    --shadow-glow: 0 0 40px rgba(201, 169, 255, 0.06);
}

/* ── RESET ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-weight: 300;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(80, 40, 140, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(140, 40, 80, 0.08) 0%, transparent 50%),
        #060608;
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── NEBULA LAYERS ── */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -150px;
    background: radial-gradient(circle, rgba(100, 60, 180, 0.09) 0%, transparent 70%);
}

body::after {
    width: 500px;
    height: 500px;
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, rgba(180, 60, 100, 0.07) 0%, transparent 70%);
}

/* ── COSMOS CANVAS ── */
#cosmos-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── APP CONTAINER ── */
.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    padding: 0 16px 48px;
    position: relative;
    z-index: 1;
}

/* ── ANIMATIONS ── */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes screen-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── TYPOGRAPHY ── */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

h4 {
    font-family: var(--font-display);
    font-weight: 400;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.85em;
    line-height: 1.5;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 20px;
}

.mt-2 {
    margin-top: 10px;
}

.mt-3 {
    margin-top: 20px;
}

.mt-4 {
    margin-top: 28px;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── SCREENS ── */
.screen {
    display: none;
    animation: screen-in 0.45s ease;
}

.screen.active {
    display: block;
}

/* ── NOTIFICATIONS ── */
#notification-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: auto;
    max-width: 320px;
}

.notification {
    background: rgba(15, 15, 25, 0.8);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px 20px;
    font-size: 0.85rem;
    color: var(--text-1);
    animation: notif-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: auto;
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.4), 
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    margin-bottom: 0;
    display: block;
}

@keyframes notif-in {
    from {
        opacity: 0;
        transform: translateX(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.notification.success {
    border-left: 3px solid var(--c-green);
    background: linear-gradient(to right, rgba(16, 185, 129, 0.08), rgba(15, 15, 20, 0.85));
}

.notification.success i {
    color: var(--c-green);
}

.notification.error {
    border-left: 3px solid var(--c-red);
    background: linear-gradient(to right, rgba(244, 63, 94, 0.08), rgba(15, 15, 20, 0.85));
}

.notification.error i {
    color: var(--c-red);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

@keyframes pulseSoft {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

.animate-scaleIn { animation: scaleIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.animate-fadeIn { animation: fadeIn 0.4s ease forwards; }
.animate-pulseSoft { animation: pulseSoft 3s ease-in-out infinite; }

/* ── GLASS CARD ── */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-card), 0 0 60px rgba(201, 169, 255, 0.05);
}

/* ── HEADER ── */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 52px 8px 20px;
    gap: 16px;
    margin-bottom: 0;
}

.app-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.1;
}

.user-code-box {
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: right;
    flex-shrink: 0;
}

.code-label {
    color: var(--text-3);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
}

#display-code {
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    letter-spacing: 0.15em;
    color: var(--primary);
    display: block;
    margin-top: 2px;
}

#anniversary-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    background: var(--primary-dim) !important;
    border: 1px solid var(--border-glow) !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.04em;
    color: var(--primary) !important;
    margin-top: 6px !important;
    box-shadow: none !important;
    font-family: var(--font-body) !important;
}

/* ── NAV TABS ── */
.app-nav,
.tabs {
    display: flex;
    gap: 4px;
    padding: 0 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
}

.app-nav::-webkit-scrollbar,
.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-2);
    font-family: var(--font-body);
    font-size: 0.73rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.tab-btn svg {
    width: 13px;
    height: 13px;
    stroke-width: 1.8;
    vertical-align: middle;
    margin-right: 4px;
}

.tab-btn:hover {
    background: var(--surface-md);
    color: var(--text-1);
    border-color: var(--border-glow);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(201, 169, 255, 0.18), rgba(255, 143, 171, 0.12));
    border-color: rgba(201, 169, 255, 0.35);
    color: var(--primary);
    font-weight: 500;
    box-shadow: 0 2px 16px rgba(201, 169, 255, 0.10);
}

/* ── TAB PANES ── */
.tab-content {
    padding: 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.35s ease;
}

/* ── INPUTS ── */
.input-group {
    margin-bottom: 14px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 6px;
    font-weight: 400;
}

input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-main) !important;
    font-size: 0.9em !important;
    font-weight: 300 !important;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: rgba(201, 169, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.07) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-3) !important;
}

select option {
    background: #111;
    color: var(--text-1);
}

textarea {
    resize: none;
}

.flex-inputs {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.flex-inputs .input-group {
    flex: 1;
    margin-bottom: 0;
}

.fat-input {
    padding: 16px 20px !important;
    font-size: 1.05em !important;
    border-radius: 16px !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.fat-input:focus {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(201, 169, 255, 0.4) !important;
}

/* ── BUTTONS ── */
button {
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.25s ease;
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border-radius: var(--radius-xl) !important;
    background: linear-gradient(135deg, rgba(201, 169, 255, 0.22), rgba(255, 143, 171, 0.16)) !important;
    border: 1px solid rgba(201, 169, 255, 0.3) !important;
    color: var(--primary) !important;
    font-family: var(--font-body) !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 20px rgba(201, 169, 255, 0.08) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(201, 169, 255, 0.32), rgba(255, 143, 171, 0.24)) !important;
    border-color: rgba(201, 169, 255, 0.5) !important;
    box-shadow: 0 8px 30px rgba(201, 169, 255, 0.18) !important;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: block;
    width: 100%;
    padding: 13px 24px;
    border-radius: var(--radius-xl) !important;
    background: var(--surface-md) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-2) !important;
    font-family: var(--font-body) !important;
    font-size: 0.78rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.btn-secondary:hover {
    background: var(--surface-hi) !important;
    border-color: var(--border-glow) !important;
    color: var(--text-1) !important;
    transform: translateY(-1px);
}

.icon-btn {
    background: var(--surface-md) !important;
    border: 1px solid var(--border) !important;
    border-radius: 50% !important;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-2);
    font-size: 0.9rem;
    padding: 0 !important;
}

.icon-btn svg {
    width: 13px;
    height: 13px;
    stroke-width: 2;
}

.icon-btn:hover {
    background: var(--surface-hi) !important;
    border-color: var(--border-glow) !important;
    color: var(--text-1);
}

.smooth-hover {
    transition: all 0.25s ease;
}

/* ── CALENDAR ── */
.calendar-wrapper {
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

#calendar-month-year {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-bottom: 0;
}

.calendar-legends {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.72em;
    margin-bottom: 14px;
    justify-content: center;
}

.legend {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-2);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot.mine {
    background: var(--accent);
}

.dot.partner {
    background: var(--primary);
}

.dot.fertile {
    background: var(--c-green);
}

.dot.ovulation {
    background: var(--gold);
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8em;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: background 0.18s, transform 0.18s;
    color: var(--text-2);
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    font-weight: 300;
}

.cal-day:hover {
    background: var(--surface-hi);
    color: var(--text-1);
}

.cal-day.empty {
    background: transparent;
    cursor: default;
    pointer-events: none;
}

.cal-day.today {
    border: 1px solid rgba(201, 169, 255, 0.45);
    color: var(--primary);
    font-weight: 500;
}

.cal-day.mine-cycle-real {
    background: rgba(255, 143, 171, 0.22);
    color: var(--accent);
    box-shadow: inset 0 0 8px rgba(255, 143, 171, 0.2);
}

.cal-day.mine-cycle-pred {
    background: rgba(255, 143, 171, 0.07);
    border: 1px dashed rgba(255, 143, 171, 0.35);
}

.cal-day.mine-fertile {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ecdb5;
}

.cal-day.mine-ovulation {
    border: 2px dashed rgba(232, 200, 122, 0.5);
    color: var(--gold);
    animation: pulseOvu 2s infinite;
}

.cal-day.partner-cycle {
    background: rgba(201, 169, 255, 0.12);
}

.cal-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
}

@keyframes pulseOvu {
    0% {
        box-shadow: 0 0 0 0 rgba(232, 200, 122, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(232, 200, 122, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(232, 200, 122, 0);
    }
}

.day-indicators {
    position: absolute;
    bottom: 2px;
    display: flex;
    gap: 2px;
    font-size: 0.55em;
    pointer-events: none;
    z-index: 5;
}

.calendar-tip {
    font-size: 0.7rem;
    text-align: center;
    color: var(--text-3);
    margin-top: 12px;
    font-style: italic;
}

/* ── TIMELINE ── */
.timeline-card h3 {
    margin-bottom: 4px;
}

.timeline-container {
    margin-top: 14px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    position: relative;
}

.timeline-month {
    margin: 14px 0 8px;
    font-size: 0.7rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.timeline-item {
    display: flex;
    gap: 14px;
    padding-bottom: 14px;
    position: relative;
    border-left: 1px solid var(--border);
    margin-left: 10px;
    padding-left: 18px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--border);
}

.timeline-item.t-intimacy::before {
    background: var(--accent);
    box-shadow: 0 0 6px rgba(255, 143, 171, 0.5);
}

.timeline-item.t-period::before {
    background: var(--c-red);
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.5);
}

.timeline-item.t-symptom::before {
    background: var(--c-blue);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.timeline-item.t-note::before {
    background: var(--primary);
    box-shadow: 0 0 6px rgba(201, 169, 255, 0.4);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    width: 100%;
    border: 1px solid var(--border);
}

.timeline-content h4 {
    margin-bottom: 3px;
    font-size: 0.85em;
    font-family: var(--font-body);
    font-weight: 500;
}

.timeline-content p {
    font-size: 0.78em;
    color: var(--text-2);
}

/* ── SYNC / CONNECTION ── */
.success-box {
    background: var(--primary-dim) !important;
    border: 1px solid var(--border-glow) !important;
    border-radius: var(--radius-md) !important;
    padding: 14px 18px !important;
    font-size: 0.83rem !important;
    color: var(--primary) !important;
    letter-spacing: 0.04em;
    font-family: var(--font-body) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

.animate-pulse {
    animation: pulse 2.5s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

#partner-info .glass-card p strong {
    color: var(--text-3);
    font-weight: 400;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 3px;
}

/* ── GAME / FLIP CARD ── */
.game-card {
    position: relative;
    overflow: hidden;
}

.game-card h3 {
    font-size: 1.4rem;
}

.flip-card {
    background: transparent;
    width: 100%;
    height: 230px;
    perspective: 1200px;
    margin: 18px 0;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-glow);
}

.flip-card-front {
    background: linear-gradient(135deg, rgba(201, 169, 255, 0.10), rgba(255, 143, 171, 0.06));
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-2);
    letter-spacing: 0.1em;
}

.flip-card-back {
    background: linear-gradient(135deg, rgba(255, 143, 171, 0.08), rgba(201, 169, 255, 0.06));
    transform: rotateY(180deg);
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--text-1);
    text-align: center;
}

/* Dare card re-uses the same flip mechanic with accent colors */
.dare-flip-card {
    background: transparent;
    width: 100%;
    height: 210px;
    perspective: 1200px;
    margin: 14px 0;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.dare-flip-card .flip-card-front {
    background: linear-gradient(135deg, rgba(255,143,171,.10), rgba(232,200,122,.06));
}

.dare-flip-card .flip-card-back {
    background: linear-gradient(135deg, rgba(255,143,171,.08), rgba(201,169,255,.06));
}

.dare-flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.floating-heart {
    position: absolute;
    font-size: 1.5em;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    animation: floatUp 3s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(100%) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateY(-300%) scale(1.5);
        opacity: 0;
    }
}

/* ── PROFILE ── */
#btn-delete-account {
    width: 100%;
    padding: 14px !important;
    background: linear-gradient(135deg, rgba(255, 74, 74, 0.14), rgba(180, 14, 14, 0.10)) !important;
    border: 1px solid rgba(255, 74, 74, 0.28) !important;
    border-radius: var(--radius-xl) !important;
    color: #ff7070 !important;
    font-family: var(--font-body) !important;
    font-size: 0.76rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

#btn-delete-account:hover {
    background: linear-gradient(135deg, rgba(255, 74, 74, 0.22), rgba(180, 14, 14, 0.16)) !important;
    border-color: rgba(255, 74, 74, 0.45) !important;
    box-shadow: 0 4px 20px rgba(255, 74, 74, 0.12) !important;
}

/* ── MODAL (bottom sheet) ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: flex-end;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
    animation: fadeBg 0.3s forwards;
}

@keyframes fadeBg {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 28px 22px 44px !important;
    background: rgba(8, 6, 14, 0.94) !important;
    backdrop-filter: blur(32px);
    border: 1px solid var(--border-glow) !important;
    border-bottom: none !important;
    animation: slideUp 0.35s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    margin-bottom: 0 !important;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

#modal-date-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 300;
}

/* ── EVENT BUTTONS ── */
.event-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 18px 0;
}

.event-btn {
    padding: 16px 10px;
    border-radius: var(--radius-md);
    background: var(--surface-md);
    border: 1px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.event-btn.active {
    border-color: var(--border-glow);
    color: var(--text-1);
    background: var(--surface-hi);
}

.event-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.event-icon svg {
    width: 22px;
    height: 22px;
}

.c-red:hover {
    background: rgba(244, 63, 94, 0.10) !important;
    border-color: rgba(244, 63, 94, 0.35) !important;
    color: #f97f95 !important;
}

.c-pink:hover {
    background: rgba(255, 143, 171, 0.10) !important;
    border-color: rgba(255, 143, 171, 0.35) !important;
    color: var(--accent) !important;
}

.c-blue:hover {
    background: rgba(59, 130, 246, 0.10) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #7eaff5 !important;
}

.c-purple:hover {
    background: rgba(201, 169, 255, 0.10) !important;
    border-color: rgba(201, 169, 255, 0.35) !important;
    color: var(--primary) !important;
}

/* ── ONBOARDING WIZARD ── */
.wizard-step {
    animation: fadeRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1) forwards;
}

@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 12px;
    display: block;
}

.role-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.role-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 22px 14px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
    text-align: center;
}

.role-card:hover {
    background: var(--surface-md);
    transform: translateY(-3px);
    border-color: var(--border-glow);
}

.role-card.active {
    border-color: rgba(201, 169, 255, 0.5);
    background: var(--primary-dim);
    box-shadow: 0 8px 28px rgba(201, 169, 255, 0.15);
    transform: scale(1.04);
}

.role-emoji {
    font-size: 2.4em;
    margin-bottom: 8px;
    display: block;
}

.role-card h4 {
    margin-bottom: 4px;
    font-size: 0.92em;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-1);
}

.role-card small {
    color: var(--text-3);
    font-size: 0.72em;
}

/* ── QUICK TAGS ── */
.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-opt {
    background: var(--surface);
    padding: 7px 15px;
    border-radius: 25px;
    font-size: 0.82em;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
    color: var(--text-2);
    user-select: none;
}

.tag-opt:hover {
    background: var(--surface-md);
    border-color: var(--border-glow);
    color: var(--text-1);
    transform: translateY(-1px);
}

.tag-opt.selected {
    background: var(--primary-dim);
    border-color: rgba(201, 169, 255, 0.4);
    color: var(--primary);
    font-weight: 500;
}

/* ── STEP DOTS ── */
.step-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.step-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s;
}

.step-dots .dot.active {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(201, 169, 255, 0.5);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* ── NAV ICON HELPERS ── */
.nav-label {
    vertical-align: middle;
}

/* ── NOTIFICATIONS ── */
#notification-wrapper {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 320px;
}

.toast {
    padding: 12px 20px;
    border-radius: 16px;
    background: rgba(15, 12, 28, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.85rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: notifIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.toast.success { border-left: 4px solid var(--primary); }
.toast.error { border-left: 4px solid #ff4a4a; }

/* ── MODALS ── */
.modal-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

/* ── EVENT BUTTONS ── */
.event-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.event-btn.active {
    background: rgba(201, 169, 255, 0.15) !important;
    border-color: rgba(201, 169, 255, 0.4) !important;
    color: #fff !important;
    transform: scale(0.98);
}

.event-btn.c-red:hover { border-color: rgba(255, 74, 74, 0.3); background: rgba(255, 74, 74, 0.05); }
.event-btn.c-pink:hover { border-color: rgba(255, 143, 171, 0.3); background: rgba(255, 143, 171, 0.05); }
.event-btn.c-blue:hover { border-color: rgba(147, 197, 253, 0.3); background: rgba(147, 197, 253, 0.05); }
.event-btn.c-purple:hover { border-color: rgba(201, 169, 255, 0.3); background: rgba(201, 169, 255, 0.05); }

/* ── TIMELINE ── */
#timeline-container {
    padding: 10px 0;
}

.timeline-month {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 25px 0 15px 10px;
    opacity: 0.6;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--surface-hi);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 18px;
    transition: all 0.3s;
}

.timeline-content h4 {
    font-size: 0.95rem;
    color: var(--text-1);
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 0.75rem;
    color: var(--text-3);
}

.timeline-item.t-period::before { background: #ff4a4a; box-shadow: 0 0 10px rgba(255, 74, 74, 0.3); }
.timeline-item.t-intimacy::before { background: #ff8fab; box-shadow: 0 0 10px rgba(255, 143, 171, 0.3); }
.timeline-item.t-symptom::before { background: #93c5fd; box-shadow: 0 0 10px rgba(147, 197, 253, 0.3); }
.timeline-item.t-note::before { background: #c9a9ff; box-shadow: 0 0 10px rgba(201, 169, 255, 0.3); }

/* ── GAME PROGRESS ── */
#game-progress-bar {
    box-shadow: 0 0 10px rgba(201, 169, 255, 0.3);
}

.floating-heart {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    font-size: 20px;
    animation: floatUp 3s ease-out forwards;
}

/* ── RESPONSIVE ── */
@media (max-width: 360px) {
    .app-header {
        padding: 38px 4px 16px;
    }

    .app-container {
        padding: 0 12px 40px;
    }
}

/* ── WIZARD SPECIALS ── */
.role-cards {
    display: flex;
    gap: 12px;
}

.role-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(201, 169, 255, 0.3);
}

.role-card.active {
    background: linear-gradient(135deg, rgba(201, 169, 255, 0.15), rgba(255, 143, 171, 0.1));
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(201, 169, 255, 0.12);
    transform: translateY(-2px) scale(1.02);
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-opt {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-2);
}

.tag-opt:hover {
    background: rgba(255, 255, 255, 0.08);
}

.tag-opt.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(201, 169, 255, 0.3);
}

.wizard-step {
    animation: fadeInRight 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}