/* ── VARIABLES ── */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a26;
  --bg-card-hover: #1f1f2e;
  --accent: #e91e8c;
  --accent-2: #9c27b0;
  --accent-grad: linear-gradient(135deg, #e91e8c, #9c27b0);
  --text-primary: #f0f0f8;
  --text-secondary: #8888aa;
  --text-muted: #55556a;
  --border: #2a2a3a;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --sidebar-w: 260px;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
input, textarea, select {
  font-family: inherit;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  width: 100%;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233,30,140,.15);
}
select option { background: var(--bg-card); }
button { cursor: pointer; font-family: inherit; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 1000;
  transition: transform .3s ease;
}
.sidebar-header {
  padding: 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.logo { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.logo span { background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-close { display: none; background: none; border: none; color: var(--text-secondary); font-size: 18px; }

.couple-mini {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.avatar-pair { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff;
}
.heart-icon { font-size: 18px; }
.couple-mini p { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.days-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  background: rgba(233,30,140,.15); color: var(--accent);
  font-size: 11px; font-weight: 600;
}

.sidebar-nav { flex: 1; padding: 12px 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: all .2s; margin-bottom: 4px;
}
.nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-item.active { background: rgba(233,30,140,.15); color: var(--accent); }
.nav-icon { font-size: 16px; }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.logout-btn {
  display: block; padding: 10px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13px;
  transition: all .2s; text-align: center;
}
.logout-btn:hover { background: rgba(239,68,68,.1); color: var(--danger); }

/* ── MAIN WRAPPER ── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; gap: 16px;
}
.menu-btn {
  display: none; background: none; border: none;
  color: var(--text-secondary); font-size: 20px;
}
.page-title { font-size: 18px; font-weight: 600; flex: 1; }
.user-name { font-size: 13px; color: var(--text-secondary); }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.content { padding: 24px; flex: 1; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.card:hover { border-color: rgba(233,30,140,.2); }

/* ── GRID LAYOUTS ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── STATS CARD ── */
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
  transition: all .2s;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.stat-icon { font-size: 28px; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-secondary); }

/* ── HERO COUNTER ── */
.days-hero {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  text-align: center; position: relative; overflow: hidden;
  margin-bottom: 24px;
}
.days-hero::before {
  content: ''; position: absolute; inset: 0;
  background: var(--accent-grad); opacity: .05;
}
.days-hero h2 { font-size: 48px; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.days-hero p { color: var(--text-secondary); font-size: 15px; margin-top: 4px; }
.days-hero .partner-info { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.days-hero .partner-info .avatar { width: 44px; height: 44px; font-size: 18px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; border: none;
  cursor: pointer; transition: all .2s;
}
.btn-primary {
  background: var(--accent-grad); color: #fff;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-secondary); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--text-primary); }
.btn-danger { background: rgba(239,68,68,.1); color: var(--danger); border: 1px solid transparent; }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-success { background: rgba(34,197,94,.1); color: var(--success); border: 1px solid transparent; }
.btn-success:hover { background: rgba(34,197,94,.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── FORM ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-group .errorlist { list-style: none; color: var(--danger); font-size: 12px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── MODAL ── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  z-index: 2000; align-items: center; justify-content: center;
}
.modal-backdrop.active { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  width: 100%; max-width: 480px; max-height: 90vh;
  overflow-y: auto; position: relative;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 20px; }
.modal-close:hover { color: var(--text-primary); }

/* ── MESSAGES ── */
.messages-container { padding: 12px 24px 0; }
.auth-messages { position: fixed; top: 20px; right: 20px; z-index: 9999; max-width: 360px; }
.alert {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 8px; font-size: 14px;
}
.alert button { background: none; border: none; color: inherit; font-size: 16px; cursor: pointer; }
.alert-success { background: rgba(34,197,94,.15); color: var(--success); border: 1px solid rgba(34,197,94,.3); }
.alert-error { background: rgba(239,68,68,.15); color: var(--danger); border: 1px solid rgba(239,68,68,.3); }
.alert-warning { background: rgba(245,158,11,.15); color: var(--warning); border: 1px solid rgba(245,158,11,.3); }
.alert-info { background: rgba(233,30,140,.15); color: var(--accent); border: 1px solid rgba(233,30,140,.3); }

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all .2s;
}
.timeline-item:hover { border-color: rgba(233,30,140,.2); }
.timeline-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(233,30,140,.15); display: flex;
  align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.timeline-body { flex: 1; }
.timeline-title { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.timeline-meta { font-size: 12px; color: var(--text-secondary); }
.timeline-desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ── MOOD GRID ── */
.mood-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.mood-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-secondary);
  cursor: pointer; transition: all .2s; color: var(--text-secondary);
  font-size: 12px;
}
.mood-btn:hover, .mood-btn.selected {
  border-color: var(--accent); background: rgba(233,30,140,.1);
  color: var(--text-primary);
}
.mood-emoji { font-size: 28px; }
.mood-input { display: none; }

/* ── ITEM CARDS ── */
.item-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  transition: all .2s; position: relative;
}
.item-card:hover { border-color: rgba(233,30,140,.25); transform: translateY(-2px); }
.item-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.item-title { font-size: 15px; font-weight: 600; }
.item-meta { font-size: 12px; color: var(--text-secondary); }
.item-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── BADGES ── */
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-watching { background: rgba(59,130,246,.15); color: #60a5fa; }
.badge-completed { background: rgba(34,197,94,.15); color: var(--success); }
.badge-planned { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-high { background: rgba(239,68,68,.15); color: var(--danger); }
.badge-medium { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-low { background: rgba(34,197,94,.15); color: var(--success); }

/* ── SECTION HEADER ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: 20px; font-weight: 700; }
.section-sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ── PROGRESS BAR ── */
.progress-bar { height: 8px; background: var(--bg-secondary); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent-grad); border-radius: 4px; transition: width .4s ease; }

/* ── AUTH PAGES ── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg-primary); padding: 20px;
}
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px;
  width: 100%; max-width: 420px;
}
.auth-logo { text-align: center; font-size: 48px; margin-bottom: 8px; }
.auth-title { text-align: center; font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.auth-sub { text-align: center; font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.auth-link { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-secondary); }
.auth-link a { color: var(--accent); }

/* ── MEMORY GRID ── */
.memory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.memory-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all .2s;
}
.memory-card:hover { border-color: rgba(233,30,140,.25); transform: translateY(-3px); }
.memory-img { width: 100%; height: 180px; object-fit: cover; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.memory-img img { width: 100%; height: 100%; object-fit: cover; }
.memory-body { padding: 14px; }
.memory-caption { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.memory-note { font-size: 12px; color: var(--text-secondary); }
.memory-date { font-size: 11px; color: var(--text-muted); margin-top: 8px; }

/* ── STATUS PRESETS ── */
.status-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.preset-btn {
  padding: 6px 12px; border: 1px solid var(--border);
  border-radius: 20px; background: var(--bg-secondary);
  color: var(--text-secondary); font-size: 12px; cursor: pointer; transition: all .2s;
}
.preset-btn:hover { border-color: var(--accent); color: var(--text-primary); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 60px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.empty-sub { font-size: 14px; color: var(--text-secondary); }

/* ── MOBILE ── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 999; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-overlay.active { display: block; }
  .main-wrapper { margin-left: 0; }
  .menu-btn { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .days-hero h2 { font-size: 36px; }
  .mood-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ── COUPLE SETUP ── */
.setup-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-primary); padding: 20px; }
.setup-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; width: 100%; max-width: 520px; }
.setup-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.setup-sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.invite-code-display {
  background: var(--bg-secondary); border: 2px dashed var(--accent);
  border-radius: var(--radius); padding: 20px; text-align: center; margin: 16px 0;
}
.invite-code-display .code { font-size: 30px; font-weight: 800; letter-spacing: 4px; color: var(--accent); }
.invite-code-display p { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--text-muted); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── SONG LINK ── */
.song-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; margin-top: 4px; }
.song-link:hover { text-decoration: underline; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }



:root {
    --pink-main: #ff6fa5;
    --pink-soft: #ffe4ec;
    --text-dark: #333;
}

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

/* BODY */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #fff0f5, #ffe4ec);
}

/* NAVBAR */
.nav {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(255,182,193,0.3);
}

/* CONTAINER */
.nav-container {
    max-width: 1100px;
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 20px;
}

/* LOGO */
.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--pink-main);
    font-family: 'Playfair Display', serif;
}

/* CENTER NAV */
.nav-center {
    display: flex;
    gap: 30px;
}

.nav-center a {
    text-decoration: none;
    font-size: 14px;
    color: #444;
    position: relative;
}

/* HOVER */
.nav-center a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;

    width: 0%;
    height: 2px;
    background: var(--pink-main);

    transition: 0.3s;
}

.nav-center a:hover::after {
    width: 100%;
}

/* RIGHT */
.nav-right {
    display: flex;
    align-items: center;
}

/* PROFILE */
.couple-profile {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;

    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(255,105,135,0.3);
}

/* HEART */
.heart {
    font-size: 16px;
    color: var(--pink-main);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* BUTTON */
.nav-btn {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--pink-main);
    color: white;
    text-decoration: none;
    font-size: 13px;
}

/* CONTENT */
.container {
    padding: 40px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-center {
        display: none;
    }

    .profile-img {
        width: 30px;
        height: 30px;
    }
}