/* ════════════════════════════════════════════
   STYLES MODULE
   ════════════════════════════════════════════ */

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

:root {
  --green:       #00b07c;
  --green-dark:  #008f63;
  --green-light: #e6f7f2;
  --green-mid:   #b3e8d8;
  --white:       #ffffff;
  --bg:          #f4faf8;
  --text:        #1a1a2e;
  --text-muted:  #6b7280;
  --border:      #d1ede5;
  --shadow:      rgba(0, 176, 124, 0.14);
}

html, body {
  height: 100%;
  background: var(--bg);
  font-family: 'Nunito', sans-serif;
  color: var(--text);
}

/* Subtle dot pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, var(--green-mid) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

/* Top green stripe */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green) 0%, #00d4a0 50%, var(--green) 100%);
  z-index: 10;
}

/* PAGE */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 72px;
}

/* ── LOGO AREA ── */
.logo-area {
  margin-bottom: 56px;
  animation: fadeDown 0.6s ease both;
}

.logo-area img {
  height: 56px;
  display: block;
}

/* ── CARDS CONTAINER ── */
.cards-container {
  display: flex;
  gap: 28px;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── CARD ── */
.card {
  position: relative;
  width: 288px;
  border-radius: 22px;
  background: var(--white);
  border: 1.5px solid var(--border);
  box-shadow: 0 6px 28px var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    transform 0.38s cubic-bezier(0.23,1,0.32,1),
    box-shadow 0.38s cubic-bezier(0.23,1,0.32,1),
    border-color 0.3s;
}

.card.animate-in:nth-child(1) { animation: fadeUp 0.6s 0.1s ease both; }
.card.animate-in:nth-child(2) { animation: fadeUp 0.6s 0.22s ease both; }

.card:hover {
  transform: translateY(-10px) scale(1.018);
  box-shadow: 0 22px 52px rgba(0,176,124,0.22), 0 0 0 2px var(--green);
  border-color: var(--green);
}

/* Image zone */
.card-img {
  width: 100%;
  height: 188px;
  background: var(--green-light);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.23,1,0.32,1);
}
.card:hover .card-img img { transform: scale(1.07); }

/* Emoji placeholder */
.card-emoji {
  font-size: 62px;
  line-height: 1;
  pointer-events: none;
}

/* Tag pill */
.card-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--green);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 50px;
  z-index: 2;
}

/* Card body */
.card-body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-cat {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 7px;
}

.card-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 10px;
}

.card-desc {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 22px;
}

/* CTA */
.card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 14.5px;
  font-weight: 800;
  padding: 13px 24px;
  border-radius: 50px;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background 0.25s, gap 0.3s, box-shadow 0.25s;
}
.card:hover .card-btn {
  background: var(--green-dark);
  gap: 12px;
  box-shadow: 0 6px 20px rgba(0,176,124,0.35);
}
.arrow { transition: transform 0.3s; }
.card:hover .arrow { transform: translateX(4px); }

/* Divider */
.divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: fadeUp 0.6s 0.16s ease both;
}
.div-line {
  width: 1.5px; height: 58px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}
.div-txt {
  font-size: 10px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--green-mid);
}

/* No cards message */
.no-cards-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 18px;
  animation: fadeUp 0.6s ease both;
}
.no-cards-message .emoji { font-size: 48px; display: block; margin-bottom: 16px; }

footer {
  position: fixed; bottom: 20px; left: 0; right: 0;
  text-align: center;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted); opacity: 0.55;
}

@keyframes fadeDown {
  from { opacity:0; transform:translateY(-18px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(22px); }
  to   { opacity:1; transform:translateY(0); }
}

/* Mobile */
@media (max-width:680px) {
  .page { padding: 44px 20px 72px; justify-content: flex-start; }
  .logo-area { margin-bottom: 36px; }
  .cards-container { flex-direction: column; gap: 18px; align-items: center; }
  .card  { width: 100%; max-width: 360px; }
  .card-img { height: 168px; }
  .divider { flex-direction: row; gap: 12px; }
  .div-line { width: 58px; height: 1.5px; background: linear-gradient(to right, transparent, var(--border), transparent); }
}

/* ── Card State Variations ── */

/* Upcoming card */
.card-upcoming {
  opacity: 0.85;
}
.card-upcoming .card-img {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}
.card-upcoming .card-btn {
  background: #f59e0b;
}
.card-upcoming .card-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Expired card (shown in archive) */
.card-expired {
  opacity: 0.7;
}
.card-expired .card-img {
  background: #f3f4f6;
  filter: grayscale(0.5);
}
.card-expired .card-btn {
  background: #9ca3af;
}

/* Tag variations */
.tag-active {
  background: var(--green);
  color: #fff;
}
.tag-upcoming {
  background: #f59e0b;
  color: #78350f;
}
.tag-expired {
  background: #6b7280;
  color: #fff;
}

/* Countdown */
.card-countdown {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  z-index: 2;
}

/* Date info */
.card-date-info {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* No cards state */
.no-cards-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 18px;
  animation: fadeUp 0.6s ease both;
}
.no-cards-message .emoji {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

/* ════════════════════════════════════════════
   DEBUG PANEL STYLES
   ════════════════════════════════════════════ */

.debug-panel {
  position: fixed;
  bottom: 60px;
  right: 20px;
  width: 360px;
  max-height: 70vh;
  background: #1e1e2e;
  border: 1.5px solid #333;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  z-index: 1000;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  color: #cdd6f4;
  overflow: hidden;
  transition: opacity 0.3s;
}

.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #181825;
  border-bottom: 1px solid #313244;
  cursor: pointer;
}

.debug-title {
  font-weight: 700;
  font-size: 14px;
  color: #f5c2e7;
}

.debug-toggle {
  background: #313244;
  border: none;
  color: #cdd6f4;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.debug-toggle:hover {
  background: #45475a;
}

.debug-content {
  overflow-y: auto;
  max-height: calc(70vh - 50px);
  padding: 16px 18px;
}

.debug-time {
  color: #a6e3a1;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #313244;
  font-size: 12px;
}

.debug-group {
  margin-bottom: 16px;
}

.debug-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #89b4fa;
  margin-bottom: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.debug-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  padding-left: 8px;
  border-left: 2px solid #313244;
  margin-bottom: 4px;
}

.debug-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #89dceb;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.debug-link:hover {
  color: #94e2d5;
  text-decoration: underline;
}

.debug-link-emoji {
  font-size: 16px;
}

.debug-link-dates {
  color: #6c7086;
  font-size: 11px;
  margin-left: auto;
}

.debug-file-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0 6px 16px;
  font-size: 11px;
  color: #6c7086;
  flex-wrap: wrap;
}

.debug-file-label {
  color: #f9e2af;
}

.debug-file-path {
  background: #313244;
  padding: 2px 8px;
  border-radius: 4px;
  color: #a6adc8;
  font-size: 11px;
}

.debug-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 50px;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.debug-badge-live {
  background: #a6e3a1;
  color: #1e1e2e;
}

.debug-badge-soon {
  background: #f9e2af;
  color: #1e1e2e;
}

.debug-badge-ended {
  background: #6c7086;
  color: #1e1e2e;
}

.debug-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #313244;
  color: #585b70;
  font-size: 10px;
  text-align: center;
}

/* Debug panel responsive */
@media (max-width: 420px) {
  .debug-panel {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 50px;
    max-height: 50vh;
  }
}