:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --muted: #64748b;
  --text: #0f172a;
  --primary: #22c55e;
  --primary-ink: #ffffff;
  --border: #e2e8f0;
  --accent: #3b82f6;
  --warn: #f97316;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border)
}

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

.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #34d399);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-ink);
  font-weight: 700
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px
}

.brand-text {
  font-weight: 600
}

.actions {
  display: flex;
  gap: 8px
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: transparent;
  cursor: pointer
}

.btn.primary {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: transparent
}

.btn.ghost {
  background: transparent
}

.btn.outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn.outline:hover {
  background: var(--bg);
}

.btn.danger {
  background: #ef4444;
  color: white;
  border-color: transparent;
}

.btn.danger:hover {
  background: #dc2626;
}

.btn.sm {
  padding: 8px 10px;
  font-size: 14px
}

.btn:active {
  transform: translateY(1px)
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.hero {
  padding: 44px 0 12px;
  border-bottom: 1px solid var(--border)
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px
}

.hero h1 {
  font-size: 28px;
  margin: 0 0 8px
}

.hero p {
  margin: 0;
  color: var(--muted)
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

#featured-videos {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  border-bottom: none;
}

#featured-videos .section-head {
  margin-bottom: 16px;
}

#featured-videos h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.section {
  padding: 24px 0;
  border-bottom: 1px solid var(--border)
}

.section h2 {
  margin: 0 0 12px;
  font-size: 20px
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px
}

.legend {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 14px
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  border: 1px solid var(--border)
}

.dot.live {
  background: var(--accent)
}

.dot.meeting {
  background: var(--warn)
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px
}

.social-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.social-top {
  display: flex;
  align-items: center;
  gap: 10px
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.social-card:hover .social-icon {
  transform: scale(1.1) rotate(3deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-icon.douyin {
  background: #0b0b0b;
  border-color: #121212
}

.social-icon.wechatChannels {
  background: #0f1b12;
  border-color: #143019
}

.social-icon.tencentMeeting {
  background: #0f172a;
  border-color: #1f2a44
}

.logo-svg {
  width: 28px;
  height: 28px;
  display: block
}

.social-title {
  font-weight: 600
}

.social-meta {
  color: var(--muted);
  font-size: 14px
}

.social-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.social-actions .btn {
  flex: 1
}

.id-row {
  display: flex;
  align-items: center;
  gap: 8px
}

.id-value {
  font-weight: 600
}

.week-controls {
  display: flex;
  gap: 8px;
  margin: 10px 0 18px;
  flex-wrap: wrap
}

.week-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.day-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.day-row.today {
  border-color: var(--primary);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
  border-left: 4px solid var(--primary);
}

.day-row.shared-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), var(--shadow);
  animation: sharedTargetPulse 1.8s ease-out;
}

@keyframes sharedTargetPulse {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

.day-info {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.date-label {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.weekday-label {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
}

.day-sessions {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 240px);
  gap: 10px;
}

.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 0;
}

.session {
  width: 240px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.session-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.session-meta {
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.session-time-plat {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  color: #333;
}

.session-actions {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 0;
  margin-top: 4px;
}

.session-actions .btn {
  width: 100%;
  white-space: nowrap;
  height: 32px;
  line-height: 30px;
  font-size: 14px;
  padding: 0 12px;
  border-radius: 6px;
  margin-top: 4px;
}

.session-entry-hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px
}

.badge.live {
  background: rgba(96, 165, 250, .14)
}

.badge.meeting {
  background: rgba(249, 115, 22, .14)
}

.badge .dot {
  margin: 0
}

.inline-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px
}

.btn.sm {
  height: 32px;
  line-height: 30px;
  padding: 0 12px
}

.btn:active {
  transform: translateY(1px)
}

.store-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.store-modal-overlay.hidden {
  display: none;
}

.store-modal {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
  padding: 22px;
}

.store-modal-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.store-modal-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.store-modal-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.store-modal-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.store-modal-error {
  min-height: 20px;
  margin-top: 10px;
  color: #dc2626;
  font-size: 13px;
}

.store-modal-error.hidden {
  visibility: hidden;
}

.store-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width:960px) {
  .week-grid {
    gap: 14px
  }
}

.site-footer {
  padding: 20px 0
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px
}

@media (max-width:960px) {
  .social-grid {
    grid-template-columns: 1fr 1fr
  }

  /* Keep 7 columns logic or allow wrapping? 
     The user requested 7 columns in one row. 
     I will remove the override here.
  */
}

@media (max-width:640px) {
  .hero {
    padding: 24px 0
  }

  .header-inner {
    height: 56px
  }

  .social-grid {
    grid-template-columns: 1fr
  }

  .day-row {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .day-info {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    padding-top: 0;
  }

  .session {
    width: 100%;
  }

  .day-sessions {
    grid-template-columns: 1fr;
  }

  .store-modal {
    padding: 18px;
    border-radius: 16px;
  }

  .store-modal-actions {
    flex-direction: column-reverse;
  }

  .store-modal-actions .btn {
    width: 100%;
  }
}

@media (max-width:420px) {
  /* Removed grid override as we use flex now */
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow);
}

.modal h3 {
  margin-top: 0;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.social-card-highlighted {
  border-color: var(--accent); /* Use the accent color for the border */
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); /* A blueish glow */
  transform: translateY(-5px); /* Slightly lift the card */
  transition: all 0.3s ease-in-out; /* Smooth transition for hover effects */
}

.social-card-highlighted .social-icon {
  border-color: var(--accent); /* Also highlight the icon border */
}

.social-card-highlighted:hover {
  transform: translateY(-8px) scale(1.02); /* More lift and slight scale on hover */
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.6); /* Stronger glow on hover */
}

.video-carousel {
  position: relative;
  margin: 0 -8px;
}

.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 12px 8px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 300px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e2e8f0;
}

.carousel-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.carousel-thumbnail {
  position: relative;
  height: 168px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-thumbnail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
  opacity: 0.95;
}

.carousel-thumbnail .play-icon {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s ease;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.carousel-item:hover .play-icon {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
}

.carousel-thumbnail .play-icon::after {
  content: '';
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
  margin-left: 5px;
}

.carousel-duration {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  color: white;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-category-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  color: white;
  padding: 6px 14px;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 500;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.carousel-info {
  padding: 16px;
  background: white;
}

.carousel-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #1e293b;
  line-height: 1.45;
  height: 44px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.carousel-meta {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 14px;
}

.carousel-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.carousel-arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 26px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.carousel-arrow:hover {
  background: #1e293b;
  color: white;
  border-color: #1e293b;
  box-shadow: 0 6px 20px rgba(30, 41, 59, 0.25);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot:hover {
  background: #94a3b8;
}

.carousel-dot.active {
  background: #1e293b;
  width: 24px;
  border-radius: 4px;
  transform: scale(1);
}

.view-all-link {
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.view-all-link:hover {
  color: #1e293b;
  text-decoration: underline;
}
