/* Colorful Star Wars–inspired dark theme */
:root {
  --bg-main: #050711;
  --bg-gradient-top: #120b2d;
  --bg-gradient-mid: #050711;
  --bg-gradient-bottom: #01030a;

  --bg-card: #0e1526;
  --bg-card-alt: #151d33;
  --bg-chip: #1e2642;

  --accent-yellow: #ffe81f;
  --accent-cyan: #4fd2ff;
  --accent-magenta: #ff5bda;
  --accent-green: #27e28a;
  --accent-orange: #ff9b3c;
  --accent-danger: #ff4b6b;

  --priority-p1: #ff5b5b;
  --priority-p1-bg: rgba(255, 91, 91, 0.16);
  --priority-p2: #37e1b3;
  --priority-p2-bg: rgba(55, 225, 179, 0.14);

  --text-main: #f5f7ff;
  --text-muted: #b0b6d4;
  --border-subtle: #2a3354;

  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 22px 50px rgba(0, 0, 0, 0.7);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

:root.light {
  --bg-main: #f3f5ff;
  --bg-gradient-top: #eef1ff;
  --bg-gradient-mid: #f3f5ff;
  --bg-gradient-bottom: #dde2ff;

  --bg-card: #ffffff;
  --bg-card-alt: #f3f5ff;
  --bg-chip: #e4e8ff;

  --accent-yellow: #fbc531;
  --accent-cyan: #00a8ff;
  --accent-magenta: #e84393;
  --accent-green: #2ecc71;
  --accent-orange: #f39c12;
  --accent-danger: #ff4757;

  --priority-p1: #e84118;
  --priority-p1-bg: rgba(232, 65, 24, 0.12);
  --priority-p2: #009432;
  --priority-p2-bg: rgba(0, 148, 50, 0.12);

  --text-main: #111320;
  --text-muted: #5c6284;
  --border-subtle: #cfd4ff;
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* Global reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at top, var(--bg-gradient-top) 0, var(--bg-gradient-mid) 45%, var(--bg-gradient-bottom) 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scroll animations */

.reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Header */

.app-header {
  padding: 16px 16px 8px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: linear-gradient(
    to bottom,
    rgba(5, 7, 17, 0.98),
    rgba(5, 7, 17, 0.9),
    rgba(5, 7, 17, 0.82),
    transparent
  );
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-title {
  font-size: 1.4rem;
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-yellow);
  text-shadow: 0 0 12px rgba(255, 232, 31, 0.55);
}

.app-subtitle {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.icon-btn {
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top, #22264a 0, #0c0f21 55%);
  color: var(--accent-yellow);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease, filter 0.12s ease;
}

.icon-btn:hover {
  filter: brightness(1.1);
}

.icon-btn:active {
  transform: scale(0.9);
  box-shadow: none;
}

/* Top nav */

.top-nav {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.top-nav::-webkit-scrollbar {
  height: 3px;
}

.top-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.26);
  border-radius: 999px;
}

.nav-pill {
  border: 1px solid var(--border-subtle);
  background: linear-gradient(135deg, #101630, #050814);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.78rem;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-pill.active {
  background: conic-gradient(
    from 40deg,
    rgba(255, 232, 31, 0.35),
    rgba(79, 210, 255, 0.4),
    rgba(255, 91, 218, 0.45),
    rgba(55, 225, 179, 0.4),
    rgba(255, 232, 31, 0.35)
  );
  color: var(--bg-main);
  border-color: rgba(255, 232, 31, 0.9);
}

/* Main */

.app-main {
  flex: 1;
  padding: 10px 12px 18px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* Status bar */

.status-bar {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(
    120deg,
    rgba(255, 91, 218, 0.22),
    rgba(79, 210, 255, 0.22),
    rgba(255, 155, 60, 0.2),
    rgba(5, 7, 17, 0.98)
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.status-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.status-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-value {
  font-size: 0.96rem;
  margin-top: 3px;
}

/* Day cards */

.days-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.day-card {
  background: linear-gradient(
    135deg,
    rgba(255, 91, 218, 0.12),
    rgba(79, 210, 255, 0.12),
    rgba(39, 226, 138, 0.12)
  );
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 14px 12px;
}

/* Park header and Area grouping */

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.day-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.day-park-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at top, #2f80ff 0, #050814 60%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.day-park-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050814; /* solid, no transparency merge */
}

.day-title {
  display: flex;
  flex-direction: column;
}

.day-date {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
}

.day-park {
  margin-top: 2px;
  font-size: 1rem;
  font-weight: 600;
}

.day-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.day-progress {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Area section inside each park */

.area-section {
  margin-top: 10px;
  border-radius: var(--radius-md);
  background: radial-gradient(
    circle at top left,
    rgba(255, 232, 31, 0.12),
    rgba(12, 18, 40, 0.96)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.area-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: linear-gradient(
    135deg,
    rgba(79, 210, 255, 0.25),
    rgba(255, 91, 218, 0.3)
  );
}

.area-name {
  font-size: 0.86rem;
  font-weight: 600;
}

.area-sub {
  font-size: 0.72rem;
  color: var(--bg-main);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.area-seq-hint {
  font-size: 0.75rem;
  color: var(--bg-main);
}

/* Attractions within area */

.attractions-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.attraction-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.07);
  background: linear-gradient(
    120deg,
    rgba(12, 18, 40, 0.95),
    rgba(12, 18, 40, 0.9)
  );
}

.attraction-item:first-child {
  border-top: none;
}

.checkbox-wrapper {
  display: inline-flex;
}

.attraction-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: #050814;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.attraction-checkbox input {
  appearance: none;
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.attraction-checkbox .checkmark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: transparent;
  transform: scale(0.3);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.attraction-checkbox input:checked + .checkmark {
  background: conic-gradient(
    from 40deg,
    var(--accent-yellow),
    var(--accent-cyan),
    var(--accent-magenta),
    var(--accent-green),
    var(--accent-yellow)
  );
  transform: scale(1);
  opacity: 1;
}

.attraction-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.attraction-top-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.attraction-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.sequence-pill {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(255, 232, 31, 0.26),
    rgba(255, 155, 60, 0.3)
  );
  color: var(--bg-main);
  border: 1px solid rgba(255, 232, 31, 0.8);
  white-space: nowrap;
}

.attraction-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.meta-chip {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-chip);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-chip.priority-p1 {
  color: var(--priority-p1);
  background: var(--priority-p1-bg);
  border-color: rgba(255, 91, 91, 0.7);
}

.meta-chip.priority-p2 {
  color: var(--priority-p2);
  background: var(--priority-p2-bg);
  border-color: rgba(55, 225, 179, 0.7);
}

.meta-chip.wait {
  border-color: rgba(79, 210, 255, 0.5);
}

.meta-chip.person {
  border-color: rgba(255, 255, 255, 0.2);
}

.ride-link {
  font-size: 0.76rem;
  color: var(--accent-cyan);
  text-decoration: none;
}

.ride-link:hover {
  text-decoration: underline;
}

.attraction-description {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Footer */

.app-footer {
  padding: 10px 16px 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.danger-btn {
  margin-top: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 75, 107, 0.85);
  background: radial-gradient(circle at top, #3c0b1c 0, #19040a 60%);
  color: var(--accent-danger);
  padding: 7px 14px;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Completed */

.attraction-item.completed .attraction-name {
  text-decoration: line-through;
  opacity: 0.7;
}

.attraction-item.completed {
  opacity: 0.75;
}

/* Responsive */

@media (min-width: 700px) {
  .app-main {
    padding: 16px 16px 26px;
  }

  .day-card {
    padding: 16px 16px 14px;
  }

  .app-title {
    font-size: 1.6rem;
  }

  .area-section {
    margin-top: 12px;
  }
}
