/* ============================================================
   每日大赛通知与订阅中心 - 第27套模板样式
   湖蓝+浅紫赛事视觉风格
   ============================================================ */

:root {
  --primary: #0EA5E9;
  --secondary: #A78BFA;
  --bg: #F0F9FF;
  --card: #FFFFFF;
  --accent: #F97316;
  --text: #0F172A;
  --text-light: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
  --transition: cubic-bezier(0.23, 1, 0.32, 1);
  --font-title: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-bg: linear-gradient(180deg, #F0F9FF 0%, #EDE9FE 100%);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s var(--transition);
}

a:hover {
  color: var(--secondary);
}

ul, ol {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 0.75rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title p {
  max-width: 600px;
  margin: 0 auto;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(240, 249, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--transition);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
}

.main-nav.active {
  display: block;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
    gap: 1.5rem;
    align-items: center;
  }
}

.main-nav a {
  display: block;
  padding: 0.5rem 0;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--primary);
}

/* Hero */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  background: var(--gradient-bg);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero .subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.hero-image {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-top: 2rem;
}

.hero-image img {
  width: 100%;
  height: auto;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--transition), box-shadow 0.3s var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.card-icon.blue { background: rgba(14, 165, 233, 0.12); color: var(--primary); }
.card-icon.purple { background: rgba(167, 139, 250, 0.12); color: var(--secondary); }
.card-icon.orange { background: rgba(249, 115, 22, 0.12); color: var(--accent); }

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

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

/* Switch Toggle */
.switch-panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.switch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.switch-item:last-child {
  border-bottom: none;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.switch-label span.icon {
  font-size: 1.25rem;
}

.switch-label .name {
  font-weight: 600;
  font-size: 0.95rem;
}

.switch-label .desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.3s var(--transition);
}

.toggle.active {
  background: var(--primary);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.toggle.active::after {
  transform: translateX(22px);
}

/* Reminder Card */
.reminder-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s var(--transition);
}

.reminder-card:hover {
  transform: translateX(4px);
}

.reminder-time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

.reminder-info {
  flex: 1;
}

.reminder-info .event {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.reminder-info .status {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.reminder-action {
  padding: 0.4rem 0.8rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

.reminder-action:hover {
  background: var(--secondary);
}

/* Sync Button */
.sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--transition), box-shadow 0.2s;
}

.sync-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.3);
}

.sync-btn:active {
  transform: scale(0.97);
}

.sync-btn .icon {
  transition: transform 0.6s var(--transition);
}

.sync-btn:hover .icon {
  transform: rotate(180deg);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary { background: rgba(14, 165, 233, 0.12); color: var(--primary); }
.badge-secondary { background: rgba(167, 139, 250, 0.12); color: var(--secondary); }
.badge-accent { background: rgba(249, 115, 22, 0.12); color: var(--accent); }
.badge-success { background: rgba(34, 197, 94, 0.12); color: #16A34A; }

/* Notification Log */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  transition: background 0.2s;
}

.notif-item.unread {
  background: rgba(14, 165, 233, 0.04);
  border-color: var(--primary);
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 0.5rem;
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.notif-content {
  flex: 1;
}

.notif-content .title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.notif-content .time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.16s ease-out, background 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: #0284C7;
  color: white;
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

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

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .sep {
  color: var(--border);
}

/* Page Header */
.page-header {
  padding: 3rem 0 2rem;
  background: var(--gradient-bg);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header .desc {
  color: var(--text-light);
  max-width: 600px;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--card);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text);
}

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--primary);
  transition: transform 0.3s var(--transition);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Footer */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand .logo {
  color: white;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  padding: 0.3rem 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Preference Panel */
.pref-group {
  margin-bottom: 1.5rem;
}

.pref-group h4 {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.pref-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pref-tag {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pref-tag.active, .pref-tag:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Search */
.search-box {
  display: flex;
  gap: 0.5rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.search-box input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-result {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  transition: background 0.2s;
}

.search-result:hover {
  background: rgba(14, 165, 233, 0.03);
}

.search-result h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.search-result h3 a {
  color: var(--primary);
}

.search-result .path {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.search-result .excerpt {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes badgeBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.animate-fade-in {
  animation: fadeInUp 0.6s var(--transition) forwards;
  opacity: 0;
}

.animate-slide-in {
  animation: slideIn 0.4s var(--transition) forwards;
  opacity: 0;
}

.badge-bounce {
  animation: badgeBounce 1.5s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 767px) {
  .section { padding: 2.5rem 0; }
  .hero { padding: 3rem 0 2rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
}

/* Utility */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Print */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  body { background: white; }
}
