:root {
  --bg-color: #0E0E11;
  --card-bg: #18181C;
  --card-border: #232329;
  --accent-yellow: #FFD400;
  --accent-hover: #E5BE00;
  --text-main: #FFFFFF;
  --text-muted: #8E8E93;
  --text-secondary: #C7C7CC;
  --tag-bg: #2C2C32;
  --green-check: #34C759;
  --font-main: 'Figtree', sans-serif;
  --font-display: 'Anton', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
}

#app-container {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  background-color: var(--bg-color);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 80px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* TOP HEADER */
.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(14, 14, 17, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 8px 20px;
}

.brand-logo {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--accent-yellow);
}

.brand-logo span {
  color: #fff;
}

.user-badge {
  font-size: 13px;
  background: var(--tag-bg);
  padding: 5px 12px;
  border-radius: 20px;
  color: var(--accent-yellow);
  font-weight: 600;
}

.tabs-nav {
  display: flex;
  padding: 0 20px;
  gap: 24px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
  padding: 10px 0;
  cursor: pointer;
  position: relative;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.tab-btn.active {
  color: var(--text-main);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--accent-yellow);
  border-radius: 3px 3px 0 0;
}

/* SUB HEADER */
.sub-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.pill-tag {
  background: var(--tag-bg);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-summary {
  font-size: 13px;
  color: var(--text-muted);
}

/* CARDS LIST */
.content-area {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.show-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.show-card:hover {
  border-color: rgba(255, 212, 0, 0.3);
}

.card-poster {
  width: 105px;
  height: 155px;
  object-fit: cover;
  flex-shrink: 0;
}

.card-info {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.show-title-pill {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  background: var(--tag-bg);
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.network-label {
  font-size: 12px;
  color: var(--text-muted);
}

.episode-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.season-ep {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-main);
}

.backlog-pill {
  background: rgba(255, 212, 0, 0.15);
  color: var(--accent-yellow);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
}

.episode-title {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.air-info {
  font-size: 12px;
  color: var(--text-muted);
}

.check-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent-yellow);
  background: transparent;
  color: var(--accent-yellow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.check-btn:hover {
  background-color: var(--accent-yellow);
  color: #000;
  transform: scale(1.1);
}

.check-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* PROFILE STATS VIEW */
.stats-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}

.stats-grid {
  display: flex;
  justify-content: space-around;
  margin-top: 18px;
}

.stat-box .num {
  font-family: var(--font-display);
  font-size: 44px;
  color: var(--accent-yellow);
  line-height: 1;
}

.stat-box .lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.reaction-sheet {
  background: #18181C;
  width: 100%;
  max-width: 520px;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--card-border);
  padding: 24px 20px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.modal-overlay.active .reaction-sheet {
  transform: translateY(0);
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 800;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
}

.rating-stars {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  background: var(--tag-bg);
  padding: 12px 16px;
  border-radius: 12px;
}

.star-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s;
}

.star-item:hover {
  transform: scale(1.15);
}

.star-icon {
  font-size: 24px;
  color: #555;
}

.star-item.selected .star-icon {
  color: var(--accent-yellow);
}

.star-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.emotions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.emotion-tile {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.emotion-tile.selected {
  border-color: var(--accent-yellow);
  background: rgba(255, 212, 0, 0.1);
}

.emotion-tile .emoji {
  font-size: 24px;
}

.emotion-tile .name {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-secondary);
}

.submit-reaction-btn {
  width: 100%;
  background-color: var(--accent-yellow);
  color: #000;
  font-size: 15px;
  font-weight: 800;
  border: none;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
}

/* BOTTOM NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 520px;
  height: 64px;
  background: rgba(14, 14, 17, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 40;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-item.active {
  color: var(--accent-yellow);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
