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

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0A0A0F;
  --bg-secondary: #12121A;
  --bg-card: #1A1A25;
  --bg-card-hover: #22222F;
  --bg-glass: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --text-primary: #F0F0F5;
  --text-secondary: #8A8A9A;
  --text-muted: #5A5A6A;
  --accent: #E8A838;
  --accent-glow: rgba(232,168,56,0.15);
  --cat-autoridade: #6C8EEF;
  --cat-conexao: #C74DDB;
  --cat-lifestyle: #4DDB8F;
  --cat-vendas: #EFAD3C;
  --cat-cultura: #EF6C6C;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 40px rgba(232,168,56,0.08);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background Gradient ── */
body::before {
  content: '';
  position: fixed;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232,168,56,0.06) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -300px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(108,142,239,0.04) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── App Container ── */
.app { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 40px 32px 80px; }

/* ── Header ── */
.header { margin-bottom: 48px; }
.header__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.header__brand { display: flex; align-items: center; gap: 14px; }
.header__logo {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), #D4882A);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #0A0A0F;
  box-shadow: 0 4px 20px rgba(232,168,56,0.25);
}
.header__title { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.header__title span { color: var(--accent); }
.header__subtitle { font-size: 14px; color: var(--text-secondary); font-weight: 400; margin-left: 58px; }

/* ── Overview ── */
.overview { animation: fadeUp 0.6s ease; }
.overview__title { font-size: 18px; font-weight: 600; margin-bottom: 24px; color: var(--text-secondary); }
.overview__title span { color: var(--text-primary); }

.weeks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.week-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.week-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: var(--transition);
}
.week-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.week-card:hover::before { opacity: 1; }

.week-card--current { border-color: rgba(232,168,56,0.3); }
.week-card--current::before { opacity: 1; }
.week-card--posted { border-color: rgba(77,219,143,0.2); }
.week-card--posted::before { background: linear-gradient(90deg, var(--cat-lifestyle), transparent); opacity: 0.6; }

.week-card__status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 14px; padding: 4px 12px;
  border-radius: 20px;
}
.week-card__status--current { background: var(--accent-glow); color: var(--accent); }
.week-card__status--posted { background: rgba(77,219,143,0.1); color: var(--cat-lifestyle); }
.week-card__status--upcoming { background: rgba(138,138,154,0.1); color: var(--text-secondary); }

.week-card__status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; animation: pulse 2s infinite;
}
.week-card__status--posted .week-card__status-dot,
.week-card__status--upcoming .week-card__status-dot { animation: none; }

.week-card__label { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.week-card__dates { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }
.week-card__thread {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.week-card__thread strong { color: var(--text-secondary); font-weight: 600; }
.week-card__arrow {
  position: absolute; right: 24px; bottom: 24px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-glass);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: var(--transition); font-size: 16px;
}
.week-card:hover .week-card__arrow { background: var(--accent); color: #0A0A0F; }

/* ── Week Detail View ── */
.week-detail { animation: fadeUp 0.5s ease; }

.week-detail__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-secondary); background: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 16px; cursor: pointer; transition: var(--transition);
  font-family: inherit; margin-bottom: 28px;
}
.week-detail__back:hover { border-color: var(--accent); color: var(--accent); }

.week-detail__header { margin-bottom: 32px; }
.week-detail__week-label { font-size: 14px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px; }
.week-detail__title { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
.week-detail__subtitle { font-size: 14px; color: var(--text-secondary); }

/* ── Thread Banner ── */
.thread-banner {
  background: linear-gradient(135deg, rgba(232,168,56,0.08), rgba(232,168,56,0.02));
  border: 1px solid rgba(232,168,56,0.15);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 32px;
  position: relative; overflow: hidden;
}
.thread-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
  border-radius: 4px 0 0 4px;
}
.thread-banner__label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--accent);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.thread-banner__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.thread-banner__desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ── Category Legend ── */
.legend {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-bottom: 32px; padding: 16px 20px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.legend__item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.legend__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Grid Headers (Day headers row) ── */
.grid-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.day-header {
  text-align: center;
  padding: 14px 8px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.day-header--clickable {
  cursor: pointer;
}
.day-header--clickable:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.day-header__dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); }
.day-header__date { font-size: 22px; font-weight: 800; margin-top: 2px; }
.day-header__expand {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  margin-top: 6px; opacity: 0; transition: var(--transition);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.day-header--clickable:hover .day-header__expand { opacity: 1; color: var(--accent); }

/* ── Section Row Label ── */
.section-row-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--text-muted);
  margin-bottom: 10px;
}

/* ── Days Grid ── */
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.day-column {
  display: flex; flex-direction: column; gap: 12px;
  animation: fadeUp 0.5s ease both;
}
.day-column:nth-child(1) { animation-delay: 0.05s; }
.day-column:nth-child(2) { animation-delay: 0.1s; }
.day-column:nth-child(3) { animation-delay: 0.15s; }
.day-column:nth-child(4) { animation-delay: 0.2s; }
.day-column:nth-child(5) { animation-delay: 0.25s; }
.day-column:nth-child(6) { animation-delay: 0.3s; }
.day-column:nth-child(7) { animation-delay: 0.35s; }

/* ── FULL-WIDTH DIVIDER (Feed / Stories) ── */
.full-divider {
  position: relative;
  margin: 28px 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.full-divider::before,
.full-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(199,77,219,0.3);
}
.full-divider__label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--cat-conexao);
  padding: 4px 16px;
  background: rgba(199,77,219,0.08);
  border-radius: 20px;
  border: 1px solid rgba(199,77,219,0.15);
  flex-shrink: 0;
}

/* ── Content Cards ── */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.content-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.content-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}
.content-card--autoridade::before { background: var(--cat-autoridade); }
.content-card--conexao::before { background: var(--cat-conexao); }
.content-card--lifestyle::before { background: var(--cat-lifestyle); }
.content-card--vendas::before { background: var(--cat-vendas); }
.content-card--cultura_pop::before { background: var(--cat-cultura); }

.content-card__category {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; margin-bottom: 8px;
}
.content-card--autoridade .content-card__category { color: var(--cat-autoridade); }
.content-card--conexao .content-card__category { color: var(--cat-conexao); }
.content-card--lifestyle .content-card__category { color: var(--cat-lifestyle); }
.content-card--vendas .content-card__category { color: var(--cat-vendas); }
.content-card--cultura_pop .content-card__category { color: var(--cat-cultura); }

.content-card__title { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-primary); margin-bottom: 8px; }
.content-card__format {
  font-size: 11px; color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg-glass);
  border-radius: 6px;
  display: inline-block;
}

/* ── Large cards (day detail view) ── */
.content-card--large {
  padding: 24px;
}
.content-card--large .content-card__category { font-size: 12px; margin-bottom: 12px; }
.content-card--large .content-card__title { font-size: 16px; margin-bottom: 14px; }
.content-card--large .content-card__format { font-size: 12px; padding: 6px 14px; }

/* ── Stories Card ── */
.stories-card {
  background: linear-gradient(135deg, rgba(199,77,219,0.06), rgba(108,142,239,0.04));
  border: 1px solid rgba(199,77,219,0.12);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}
.stories-card:hover {
  border-color: rgba(199,77,219,0.25);
  transform: translateY(-2px);
}
.stories-card__label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--cat-conexao);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.stories-card__label::before {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid var(--cat-conexao);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(199,77,219,0.3), transparent);
}
.stories-card__title { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-primary); margin-bottom: 8px; }
.stories-card__note {
  font-size: 11px; color: var(--text-muted); font-style: italic;
  padding-left: 12px;
  border-left: 2px solid rgba(199,77,219,0.2);
}

.stories-card--large { padding: 24px; }
.stories-card--large .stories-card__label { font-size: 12px; margin-bottom: 12px; }
.stories-card--large .stories-card__title { font-size: 16px; margin-bottom: 14px; }
.stories-card--large .stories-card__note { font-size: 13px; }

/* ── Day Detail View ── */
.day-detail-header { margin-bottom: 36px; }
.day-detail-header__week {
  font-size: 13px; color: var(--text-muted); margin-bottom: 8px;
}
.day-detail-header__title {
  font-size: 32px; font-weight: 800; letter-spacing: -0.5px;
}
.day-detail-header__title span { color: var(--accent); }

.day-detail-section { margin-bottom: 36px; }
.day-detail-section__title {
  font-size: 16px; font-weight: 700; margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.day-detail-cards {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 640px;
}

.day-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.day-nav__btn {
  font-family: inherit; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 20px; cursor: pointer; transition: var(--transition);
}
.day-nav__btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--bg-card-hover);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .days-grid, .grid-headers { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .app { padding: 24px 16px 60px; }
  .days-grid, .grid-headers { grid-template-columns: repeat(2, 1fr); }
  .weeks-grid { grid-template-columns: 1fr; }
  .header__title { font-size: 20px; }
}
@media (max-width: 600px) {
  .days-grid, .grid-headers { grid-template-columns: 1fr; }
  .header__subtitle { margin-left: 0; margin-top: 4px; }
  .header__top { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
