/* =========================================
   Global Variables & Reset
   ========================================= */
:root {
  --scs-primary: #16a34a;       /* Green */
  --scs-primary-dark: #15803d;
  --scs-secondary: #0f172a;     /* Dark Blue/Grey */
  --scs-bg-soft: #f8fafc;
  --scs-border: #e2e8f0;
  --scs-major: #E21C23;         /* Major Brand Color */
  --scs-sf: #003D78;            /* SF Brand Color */
  --scs-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --scs-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --scs-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --scs-radius: 12px;
}

/* =========================================
   Theme: Emerald Pro (The Ultimate Version)
   ========================================= */
.scs-emerald-pro {
  font-family: 'Kanit', system-ui, -apple-system, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--scs-bg-soft);
  border-radius: var(--scs-radius);
  overflow: hidden;
  border: 1px solid var(--scs-border);
}

/* Header Section */
.scs-emerald-pro .scs-header {
  text-align: center;
  padding: 24px 20px;
  background: #fff;
  border-bottom: 1px solid var(--scs-border);
}
.scs-emerald-pro .scs-header h2 {
  margin: 0 0 12px 0;
  color: var(--scs-secondary);
  font-size: 1.5rem;
  font-weight: 700;
}
.scs-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.scs-badges span {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 99px;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--scs-shadow-sm);
}
.badge-major { background-color: var(--scs-major); }
.badge-sf { background-color: var(--scs-sf); }

/* Sticky Date Header */
.scs-date-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 12px 24px;
  font-weight: 700;
  color: var(--scs-secondary);
  border-bottom: 1px solid var(--scs-border);
  box-shadow: var(--scs-shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}
.scs-date-sticky::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: var(--scs-primary);
  border-radius: 2px;
}

/* Grid Layout */
.scs-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Movie Card */
.scs-card {
  background: #fff;
  border-radius: var(--scs-radius);
  overflow: hidden;
  display: flex;
  border: 1px solid var(--scs-border);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--scs-shadow-sm);
}
.scs-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--scs-shadow-lg);
  border-color: #cbd5e1;
}

/* Poster Area */
.scs-poster {
  width: 120px;
  flex-shrink: 0;
  position: relative;
  background: #e2e8f0;
}
.scs-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scs-rating {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  backdrop-filter: blur(2px);
}

/* Info Area */
.scs-info {
  padding: 14px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Fix flex overflow */
}
.scs-movie-title {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  color: var(--scs-secondary);
  line-height: 1.3;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tags */
.scs-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.scs-tags span {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--scs-border);
  color: #64748b;
  font-weight: 600;
  background: #fff;
}
.scs-tags .tag-sound.is-th { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.scs-tags .tag-sound.is-en { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* Showtimes Grid */
.scs-showtimes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.scs-time-pill {
  background: var(--scs-bg-soft);
  color: var(--scs-secondary);
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid var(--scs-border);
  transition: all 0.2s;
}
.scs-time-pill:hover {
  background: var(--scs-primary);
  color: #fff;
  border-color: var(--scs-primary);
}

/* Footer Actions */
.scs-actions {
  margin-top: auto;
}
.scs-btn-book {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--scs-secondary);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}
.scs-btn-book:hover {
  background: #000;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .scs-grid { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .scs-card { height: auto; }
  .scs-poster { width: 100px; }
  .scs-movie-title { white-space: normal; } /* Allow wrap on mobile */
  .scs-time-pill { font-size: 0.9rem; padding: 8px 12px; flex-grow: 1; text-align: center; }
}

/* =========================================
   Theme: Classic (Legacy Support)
   ========================================= */
.scs-wrap { background: #fff; }
.scs-tabs { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px; }
.scs-tab { border: 1px solid var(--scs-border); padding: 8px 16px; border-radius: 99px; background: #fff; cursor: pointer; white-space: nowrap; color: #64748b; }
.scs-tab.is-active { background: var(--scs-primary); color: #fff; border-color: var(--scs-primary); }
.scs-day { display: none; animation: fadeIn 0.3s ease; }
.scs-day.is-active { display: block; }
.scs-list { display: flex; flex-direction: column; gap: 16px; }
.scs-item { display: flex; gap: 14px; padding: 12px; border: 1px solid var(--scs-border); border-radius: var(--scs-radius); }
.scs-empty { text-align: center; padding: 40px; color: #94a3b8; border: 2px dashed var(--scs-border); border-radius: var(--scs-radius); }

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