/* ============================================================
   CHAT LOGBOOK — Shared Styles
   Welcome page + Day view
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Outfit:wght@300;400;500&display=swap');

:root {
    --bg:           #080b14;
    --bg-card:      #0f1221;
    --bg-card2:     #131728;
    --border:       rgba(255,255,255,0.06);
    --text:         rgba(255,255,255,0.92);
    --muted:        rgba(255,255,255,0.42);
    --accent:       #7c8fef;      /* blue-purple for "me" bubbles */
    --her:          #e46f9a;      /* rose for "her" bubbles */
    --radius:       18px;
    --nav-h:        60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- Orbs ---- */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.09;
    pointer-events: none;
    z-index: 0;
}
.orb-1 { width: 700px; height: 700px; background: #5b72f5; top: -200px; left: -200px; }
.orb-2 { width: 500px; height: 500px; background: #e46f9a; bottom: 0;    right: -150px; }
.orb-3 { width: 400px; height: 400px; background: #9333ea; top: 50%;     left: 40%; }

/* ---- Nav ---- */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(8,11,20,0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}
.nav-back {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.nav-back:hover { opacity: 1; }
.nav-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ===========================================================
   WELCOME PAGE — HERO
   =========================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem;
    position: relative;
    z-index: 1;
}
.hero-inner { max-width: 640px; text-align: center; }

.hero-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 7vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.2rem;
}
.hero-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent), var(--her));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 3rem;
}

/* Stats strip */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 1rem 2.5rem;
    flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
    display: block;
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--her));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}
.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}
.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

.scroll-btn {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    background: linear-gradient(135deg, var(--accent), var(--her));
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(124,143,239,0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}
.scroll-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(124,143,239,0.35); }

/* ===========================================================
   LOGBOOK CARDS SECTION
   =========================================================== */
.logbook-section {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logbook-header {
    text-align: center;
    margin-bottom: 3rem;
}
.logbook-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-bottom: 0.5rem;
}
.logbook-sub {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.day-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    animation: fadeUp 0.5s ease both;
}
.day-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 50px rgba(0,0,0,0.4);
    border-color: rgba(124,143,239,0.25);
}

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

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.card-date-block {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.card-day-num {
    font-family: 'Syne', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.card-month {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-top: 2px;
}

.card-tag {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    border: 1px solid;
    white-space: nowrap;
    margin-top: 4px;
}

.card-mood {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mood-emoji { font-size: 1.3rem; }
.mood-label {
    font-size: 0.82rem;
    color: var(--muted);
    font-style: italic;
}
.day-name {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.2);
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.card-summary {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.65;
    font-weight: 300;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}
.card-msg-count {
    font-size: 0.78rem;
    color: var(--muted);
}
.card-arrow {
    font-size: 0.78rem;
    color: var(--accent);
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}
.day-card:hover .card-arrow { opacity: 1; transform: translateX(3px); }

/* ===========================================================
   DAY PAGE — Header
   =========================================================== */
.day-page .day-header {
    padding: calc(var(--nav-h) + 3rem) 1.5rem 3rem;
    text-align: center;
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, rgba(124,143,239,0.04), transparent);
}
.day-header-inner { max-width: 640px; margin: 0 auto; }

.day-meta-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}
.day-tag-badge {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    border: 1px solid;
}
.day-name-badge {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.day-date-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.day-mood-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.day-mood-emoji { font-size: 1.6rem; }
.day-mood-label { font-size: 0.9rem; color: var(--muted); font-style: italic; }

.day-summary {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.75;
    font-weight: 300;
    max-width: 480px;
    margin: 0 auto;
}

/* ===========================================================
   CHAT WINDOW
   =========================================================== */
.chat-window {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}
.chat-inner {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Bubbles */
.bubble {
    display: flex;
    animation: bubblePop 0.4s ease both;
}
@keyframes bubblePop {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.bubble-me  { justify-content: flex-end; }
.bubble-her { justify-content: flex-start; }

.bubble-inner {
    max-width: 72%;
    padding: 0.75rem 1.1rem 0.5rem;
    border-radius: 18px;
    position: relative;
}

.bubble-me .bubble-inner {
    background: linear-gradient(135deg, #4f63d2, #7c8fef);
    border-bottom-right-radius: 4px;
}
.bubble-her .bubble-inner {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.bubble-text {
    font-size: 0.93rem;
    line-height: 1.55;
    color: #fff;
    font-weight: 400;
}
.bubble-her .bubble-text { color: rgba(255,255,255,0.85); }

.bubble-time {
    display: block;
    font-size: 0.65rem;
    opacity: 0.5;
    margin-top: 0.3rem;
    text-align: right;
}
.bubble-her .bubble-time { text-align: left; }

/* Label above first message */
.bubble-me:first-child::before,
.bubble-her:first-child::before {
    display: none;
}

/* ===========================================================
   COMMENT ZONE (day page)
   =========================================================== */
.comment-zone-day {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}
.comment-zone-label {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
}

/* ===========================================================
   FOOTER
   =========================================================== */
.footer {
    text-align: center;
    padding: 3rem 1rem 4rem;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}
.footer-back {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    opacity: 0.65;
    transition: opacity 0.2s;
}
.footer-back:hover { opacity: 1; }
.footer-note { font-size: 0.75rem; color: rgba(255,255,255,0.18); }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 600px) {
    .hero-stats { gap: 1rem; padding: 0.9rem 1.5rem; }
    .stat-divider { display: none; }
    .cards-grid { grid-template-columns: 1fr; }
    .bubble-inner { max-width: 88%; }
    .nav-title { display: none; }
}
