/* Import a playful, accessible font */
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap');

/* BODY LAYOUT — sticky footer setup */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #ffd9f1, #ffe6f7, #ffdff6);
    font-family: 'Comic Neue', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

/* CLOUD OVERLAY — soft transparency */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('/static/imgs/clouds-bg.png') center center / cover no-repeat;
    opacity: 0.35;
    z-index: -2;
}

/* MAIN CONTENT AREA */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #ffd0e8;
}

header h1 {
    font-size: 1.6rem;
    color: #c02672;
    margin: 0;
    font-weight: 700;
}

header nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

header nav a {
    text-decoration: none;
    color: #c02672;
    font-weight: 600;
    transition: all 0.2s ease;
}

header nav a:hover {
    text-decoration: underline;
    color: #ff69b7;
}

header .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

header .user-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Auth links (login/logout) smaller + parentheses */
.auth-link {
  font-size: 0.85em;      /* slightly smaller */
  color: #c02672;
}

.auth-link a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;       /* lighter than nav links */
}

.auth-link a:hover {
  text-decoration: underline;
  color: #ff69b7;
}

/* TITLE CARD — aligned with dashboard */
.title-card {
    margin: 32px auto;
    text-align: center;
    padding: 28px 12px;
    background: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    border-radius: 20px;
    width: 92%;
    max-width: 1200px;
    box-shadow: 0 12px 28px rgba(255, 140, 190, 0.25);
    backdrop-filter: blur(6px);
}

.title-card h1 {
    color: #c02672;
    margin-bottom: 8px;
    font-size: 2.2rem;
    font-weight: 700;
}

}
.title-card p {
  margin: 0 auto;
  max-width: 95%;     /* keeps text away from edges */
}

/* DASHBOARD GRID — aligned with title card */
.dashboard-wrapper {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto 50px;
    display: grid;
    gap: 24px;
}

@media (orientation: portrait), (max-width: 768px) {
    .dashboard-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (orientation: landscape) and (min-width: 769px) {
    .dashboard-wrapper {
        grid-template-columns: 0.45fr 1fr;
        align-items: start;
    }
}

/* CARDS */
.card {
    background: rgba(255, 255, 255, 0.9);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(255, 140, 190, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(6px);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(255, 140, 190, 0.28);
}

/* STATUS BUTTONS */
.status-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pink-btn {
    background: linear-gradient(135deg, #ff8ac9, #ff69b7);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 0;
    border-radius: 16px;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(255, 100, 170, 0.35);
    transition: all 0.2s ease;
}

.pink-btn:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 100, 170, 0.45);
}

.pink-btn:active:not([disabled]) {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(255, 100, 170, 0.35);
}

.pink-btn[disabled] {
    opacity: 0.45;
    background: #ffcce8;
    cursor: not-allowed;
}

/* PROFILE */
.profile-card {
    padding: 26px;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(255, 140, 190, 0.2);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-bottom: 22px;
    font-size: 0.95rem;
}

.edit-form {
    padding: 0 6px;
}

.edit-form label {
    font-weight: 700;
    color: #c02672;
    margin: 6px 0;
    display: block;
}

.edit-form input,
.edit-form textarea {
    font-size: 0.95rem;
    line-height: 1.4;
    font-family: inherit;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #ffc5e9;
    background: #fff8fc;
    transition: border 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.edit-form textarea {
    font-size: 0.95rem;
    line-height: 1.4;
    font-family: inherit;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.edit-form input:focus,
.edit-form textarea:focus {
    outline: none;
    border-color: #ff69b7;
    box-shadow: 0 0 6px rgba(255, 100, 170, 0.3);
}

.save-btn {
    margin-top: 16px;
    background: #ff7ac4;
    border: none;
    color: white;
    padding: 12px 26px;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.save-btn:hover {
    background: #ff69b7;
    transform: translateY(-2px);
}

/* FLASHES */
.flash-box,
.flashes {
    width: 90%;
    margin: 28px auto;
    list-style: none;
    padding: 0;
}

.flash-box li,
.flashes li {
    background: #ffe2f1;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(255, 140, 190, 0.15);
    animation: fadeIn 0.6s ease;
}

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

/* FOOTER — pinned to bottom */
footer {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    border-top: 1px solid #f0cce0;
    font-size: 0.85rem;
    color: #666;
}

/* FLOATING SPARKLES */
.floating-clouds {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.sparkle {
    position: absolute;
    top: 100vh;
    width: 10px;
    height: 10px;
    background: rgba(255, 200, 245, 0.8);
    border-radius: 50%;
    animation: floatUp 14s linear infinite;
}

/* JUMBOTRON */
.jumbotron {
    padding: 4rem 2rem;
    background: linear-gradient(to bottom, rgba(255, 245, 250, 0.9), rgba(255, 255, 255, 0.9));
    text-align: center;
    border-radius: 20px;
    width: 92%;              /* match dashboard */
    max-width: 1200px;
    margin: 32px auto;       /* centered with side margins */
    box-sizing: border-box;  /* prevent overflow */
    box-shadow: 0 12px 28px rgba(255, 140, 190, 0.25);
    backdrop-filter: blur(6px);
}

.jumbotron-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.jumbotron-t {
    font-size: 2.2rem;
    font-weight: 700;
    color: #c02672;
    margin-bottom: 1rem;
}

.jumbotron-d {
    max-width: 600px;
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.jumbotron-buttons .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: linear-gradient(135deg, #ff8ac9, #ff69b7);
    color: white;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    margin: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jumbotron-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 100, 170, 0.35);
}

.jumbotron-buttons .btn.blue {
    background: linear-gradient(135deg, #7a5eff, #3aa1ff);
}

.jumbotron-buttons .btn.blue:hover {
    box-shadow: 0 8px 16px rgba(58, 161, 255, 0.35);
}

/* FEATURES BOX */
.features-box {
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    width: 92%;              /* match dashboard */
    max-width: 1200px;
    margin: 40px auto;       /* centered with side margins */
    box-sizing: border-box;  /* prevent overflow */
    box-shadow: 0 12px 28px rgba(255, 140, 190, 0.25);
    backdrop-filter: blur(6px);
    text-align: center;
}

.features-t {
    font-size: 2rem;
    color: #c02672;
    margin-bottom: 2rem;
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.feature {
    max-width: 300px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 6px 14px rgba(255, 140, 190, 0.18);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(255, 140, 190, 0.28);
}

.feature-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.feature-info-t {
    font-size: 1.25rem;
    font-weight: 700;
    color: #c02672;
    margin-bottom: 0.5rem;
}

.feature-info-d {
    font-size: 1rem;
    color: #555;
    line-height: 1.4;
}

/* DISCLAIMER BANNER */
.disclaimer {
    width: 92%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 12px 20px;
    background: rgba(255, 200, 220, 0.9);
    border: 1px solid #ff69b7;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #c02672;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 140, 190, 0.15);
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* TITLE SIDE */
.nav-left {
  display: flex;
  align-items: center;
  flex: 1; /* keeps title left and pushes toggle right */
}

.nav-left h1 {
  font-size: 1.4rem;
  color: #c02672;
  margin: 0;
  font-weight: 700;
}

/* HAMBURGER TOGGLE */
.nav-toggle {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #c02672;
  cursor: pointer;
  display: none;     /* hidden on desktop */
  line-height: 1;    /* vertical alignment */
  margin-left: 12px; /* small spacing from title */
}

/* LINKS LIST */
.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* MOBILE MENU */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap; /* allows menu to occupy next line */
  }

  .nav-toggle {
    display: block;
    order: 2;        /* stays in the header row */
    margin-left: auto;
  }

  .nav-links {
    display: none;            /* hidden by default */
    flex-direction: column;   /* stacked vertically */
    width: 100%;              /* full width under header row */
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1rem;
    margin: 0;
    order: 3;                 /* ensures it drops below */
    flex-basis: 100%;         /* occupy entire next line */
    overflow-x: hidden;       /* prevent horizontal overflow */
  }

  body.nav-open .nav-links {
    display: flex;            /* reveal stacked menu */
  }
}

/* USER ITEM WITH AVATAR + USERNAME + ACTION */
.user-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-item img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.user-item .username {
  color: #c02672;
  font-weight: 600;
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 12px;
  transition: opacity 0.3s ease;
  opacity: 0; /* hidden by default */
}

::-webkit-scrollbar-track {
  background: transparent; /* invisible track until hover */
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff8ac9, #ff69b7);
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

/* Show scrollbar when hovering over the scroll area */
html:hover::-webkit-scrollbar,
body:hover::-webkit-scrollbar {
  opacity: 1;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: pink transparent; /* hidden by default */
  transition: scrollbar-color 0.3s ease;
}

/* Overlay */
.compliance-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  display: none; /* hidden until needed */
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.35s ease;
}
.compliance-overlay.is-open { display: flex; }

/* Card */
.compliance-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 420px;
  width: 90%;
  text-align: left; /* more natural for forms */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  font-family: var(--font-body, "Helvetica Neue", Arial, sans-serif);
}

/* Header */
.card-header {
  margin-bottom: 1rem;
}
.card-header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--brand-primary, #c02672);
  margin-bottom: 0.35rem;
}
.card-header p {
  font-size: 0.98rem;
  color: #555;
  line-height: 1.5;
}

/* Inputs */
.label,
label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: #333;
}
.input,
input[type="date"],
input[type="text"],
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #fff;
  font-size: 1rem;
  color: #222;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1rem;
}
.input:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--brand-primary, #c02672);
  box-shadow: 0 0 0 3px rgba(192, 38, 114, 0.15);
}

/* Cookie consent */
.cookie-consent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
  font-size: 0.95rem;
  color: #444;
}
.cookie-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-primary, #c02672);
}

/* Button */
.btn-primary {
  display: inline-block;
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--brand-primary, #c02672);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.06s ease;
}
.btn-primary:hover { background: var(--brand-primary-dark, #a01f5d); }
.btn-primary:active { transform: translateY(1px); }

/* Subtle helpers */
.compliance-card + * { /* spacing to avoid jumpiness if anything follows */
  margin-top: 0.75rem;
}

/* Mobile */
@media (max-width: 480px) {
  .compliance-card {
    padding: 1.1rem;
    max-width: 92%;
  }
  .card-header h2 { font-size: 1.4rem; }
  .card-header p { font-size: 0.95rem; }
}

/* --- Shared page wrappers --- */
.page-wrapper {
  width: 92%;
  max-width: 1000px;
  margin: 32px auto;
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(255, 140, 190, 0.18);
  backdrop-filter: blur(6px);
}

/* --- Headings --- */
.page-wrapper h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #c02672;
  margin-bottom: 1rem;
  text-align: center;
}

.page-wrapper h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #a01f5d;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* --- Paragraphs --- */
.page-wrapper p {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 1rem;
}

/* --- Legal pages (TOS & Privacy) --- */
.legal-page {
  width: 92%;
  max-width: 1200px;
  margin: 32px auto;
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(255, 140, 190, 0.18);
  backdrop-filter: blur(6px);
  box-sizing: border-box;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #c02672;
  margin-bottom: 1rem;
  text-align: center;
}

/* constrain all text inside to 600px */
.legal-page .content {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
  color: #444;
  line-height: 1.5;
  text-align: justify;
}

/* headings inside the text */
.legal-page strong {
  display: block;
  font-weight: 700;
  color: #c02672;
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}

/* italic effective date or notes */
.legal-page em {
  display: block;
  font-style: italic;
  margin-bottom: 0.6rem;
  color: #666;
}

/* horizontal dividers */
.legal-page hr {
  border: none;
  border-top: 2px solid #f0b6d6;
  margin: 1.2rem 0;
  width: 100%;
}

/* --- Dev team cards with avatar --- */
.dev-team section {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(255, 140, 190, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dev-team section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 140, 190, 0.25);
}

.dev-team img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.dev-team h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #a01f5d;
}

.dev-team p {
  margin: 4px 0 0;
  color: #555;
  white-space: pre-wrap;
}

/* --- Error pages --- */
.error-page {
  text-align: center;
  padding: 4rem 2rem;
}

.error-page h1 {
  font-size: 2.2rem;
  color: #c02672;
  margin-bottom: 1rem;
}

.error-page p {
  font-size: 1.1rem;
  color: #555;
}

.error-page a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #ff8ac9, #ff69b7);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.error-page a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255, 100, 170, 0.35);
}

/* Character count display */
.char-count {
  font-size: 0.8rem;
  color: #777;
  text-align: right;
  margin-top: -6px;   /* tuck closer to the input */
  margin-bottom: 10px;
  transition: color 0.25s ease;
}

/* Highlight when close to limit */
.char-count.near-limit {
  color: #c02672;     /* brand pink */
  font-weight: 600;
}

/* Optional: animate when hitting max */
.char-count.maxed {
  color: #ff3b3b;
  font-weight: 700;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes floatUp {