/* ==========================================
   PROK-TV: 한국기독교장로회 스마트 라이브 포털
   Design System & Heritage Styling
   ========================================== */

:root {
  /* Color Palette - PROK Heritage */
  --prok-navy-dark: #071526;
  --prok-navy-primary: #0C2340;
  --prok-navy-secondary: #13335A;
  --prok-navy-light: #1D4373;
  --prok-navy-subtle: #F0F4F9;
  
  --prok-teal: #00A896;
  --prok-teal-light: #02C39A;
  --prok-teal-glow: rgba(2, 195, 154, 0.25);
  
  --prok-gold: #C5A059;
  --prok-gold-light: #E0C78E;
  --prok-gold-badge: #FFF9E6;
  
  --live-red: #EF4444;
  --live-red-glow: rgba(239, 68, 68, 0.35);

  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --border-light: #E2E8F0;
  --border-focus: #CBD5E1;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-white: #FFFFFF;
  
  --shadow-sm: 0 1px 3px rgba(12, 35, 64, 0.05);
  --shadow-md: 0 4px 12px rgba(12, 35, 64, 0.08);
  --shadow-lg: 0 12px 30px rgba(12, 35, 64, 0.12);
  --shadow-hover: 0 18px 36px rgba(12, 35, 64, 0.16);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  min-height: 100%;
  font-family: 'Outfit', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================
   Header & GNB
   ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 35, 64, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-emblem {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #183C66 0%, #0C2340 100%);
  border: 1px solid rgba(197, 160, 89, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.brand-emblem svg {
  width: 24px;
  height: 24px;
  color: var(--prok-gold-light);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #FFFFFF;
}

.brand-tv-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--prok-teal) 0%, var(--prok-teal-light) 100%);
  color: #032A25;
  padding: 2px 7px;
  border-radius: 4px;
}

.brand-sub {
  font-size: 0.72rem;
  color: #94A3B8;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(2, 195, 154, 0.12);
  border: 1px solid rgba(2, 195, 154, 0.3);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--prok-teal-light);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--prok-teal-light);
  box-shadow: 0 0 0 0 rgba(2, 195, 154, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(2, 195, 154, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(2, 195, 154, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(2, 195, 154, 0);
  }
}

.room-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 3px 4px 3px 14px;
  transition: var(--transition);
}

.room-input-wrap:focus-within {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--prok-teal-light);
  box-shadow: 0 0 0 3px rgba(2, 195, 154, 0.2);
}

.room-input-wrap input {
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 0.86rem;
  outline: none;
  width: 140px;
}

.room-input-wrap input::placeholder {
  color: #94A3B8;
  font-size: 0.8rem;
}

.room-input-btn {
  background: var(--prok-teal);
  color: #032A25;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.room-input-btn:hover {
  background: var(--prok-teal-light);
  transform: translateY(-1px);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
  position: relative;
  background: linear-gradient(180deg, var(--prok-navy-primary) 0%, var(--prok-navy-dark) 100%);
  color: var(--text-white);
  padding: 56px 0 68px;
  overflow: hidden;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 15% 30%, rgba(0, 168, 150, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(197, 160, 89, 0.08) 0%, transparent 45%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(197, 160, 89, 0.12);
  border: 1px solid rgba(197, 160, 89, 0.35);
  color: var(--prok-gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-title .highlight {
  color: #38BDF8;
  background: linear-gradient(135deg, #38BDF8 0%, var(--prok-teal-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.08rem;
  color: #CBD5E1;
  line-height: 1.7;
  margin-bottom: 32px;
  font-weight: 300;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #E2E8F0;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-badge-item svg {
  width: 18px;
  height: 18px;
  color: var(--prok-gold-light);
}

/* ==========================================
   Live On-Air Section
   ========================================== */
.section-live {
  padding: 54px 0 70px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
  border-bottom: 2px solid #E2E8F0;
  padding-bottom: 14px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--prok-navy-dark);
}

.section-count-badge {
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--prok-navy-primary);
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-refresh:hover {
  background: #F1F5F9;
  color: var(--prok-navy-primary);
  border-color: #CBD5E1;
}

/* Broadcast Grid */
.broadcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 26px;
}

/* Broadcast Card */
.broadcast-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.broadcast-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #CBD5E1;
}

.card-thumbnail-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0A192F 0%, #172A45 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.card-thumbnail-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.card-thumbnail-fallback svg {
  width: 44px;
  height: 44px;
}

.card-live-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(220, 38, 38, 0.92);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.card-viewers-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(12, 35, 64, 0.8);
  backdrop-filter: blur(4px);
  color: #E2E8F0;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

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

.card-category-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: #EFF6FF;
  color: var(--prok-navy-secondary);
  padding: 2px 9px;
  border-radius: 4px;
  border: 1px solid #DBEAFE;
}

.card-room-id {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--prok-navy-dark);
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-presenter {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.card-presenter svg {
  width: 14px;
  height: 14px;
  color: var(--prok-gold);
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-card-join {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--prok-navy-primary);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.btn-card-join:hover {
  background: var(--prok-teal);
  color: #032A25;
  transform: translateY(-1px);
}

/* Empty State */
.empty-broadcast {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 2px dashed #CBD5E1;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--prok-navy-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--prok-navy-secondary);
}

.empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--prok-navy-dark);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 20px;
}

.btn-demo-create {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--prok-navy-secondary);
  color: #FFFFFF;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-demo-create:hover {
  background: var(--prok-navy-primary);
}

/* ==========================================
   Features / Pastoral Guide Section
   ========================================== */
.section-guide {
  background: #FFFFFF;
  padding: 64px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.guide-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.guide-card:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.guide-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--prok-navy-primary);
  color: var(--prok-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.guide-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--prok-navy-dark);
  margin-bottom: 8px;
}

.guide-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
  background: var(--prok-navy-dark);
  color: #94A3B8;
  padding: 48px 0 36px;
  font-size: 0.82rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.footer-brand {
  max-width: 440px;
}

.footer-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.footer-brand-desc {
  line-height: 1.6;
  color: #94A3B8;
}

.footer-meta {
  line-height: 1.7;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  color: #64748B;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: #94A3B8;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #FFFFFF;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .header-actions .room-input-wrap {
    display: none;
  }
  .broadcast-grid {
    grid-template-columns: 1fr;
  }
}
