/*
Theme Name: Clash Verge Lab
Theme URI: https://clashlabs.com.cn
Author: Clash Verge Team
Author URI: https://clashlabs.com.cn
Description: Modern, sleek, responsive theme for Clash Verge Lab built with Google SEO best practices.
Version: 1.0.3
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: lab
Tags: custom-menu, responsive-layout, theme-options, translation-ready, seo-friendly
*/

:root {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-light: #6366F1;
  --primary-lighter: #EEF2FF;
  --secondary: #7C3AED;
  --text-main: #1E293B;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --bg: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --warning: #F59E0B;
  --success: #10B981;
  --danger: #EF4444;
  --info: #3B82F6;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-main);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* Hero Section */
.hero-lab, .download-hero {
  padding: 120px 0 60px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, #EEF2FF 0%, #FFFFFF 70%);
}

.lab-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 16px auto 32px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-main);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Cards & Layout */
.feature-grid, .detail-grid, .article-grid, .platform-cards, .vision-grid {
  display: grid;
  gap: 24px;
}

.feature-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.detail-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.article-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.platform-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.vision-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.art-card, .pf-card, .feat-card, .detail-card, .vision-card, .proj-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: all 0.25s ease;
}

.art-card:hover, .pf-card:hover, .feat-card:hover, .detail-card:hover, .vision-card:hover, .proj-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(79, 70, 229, 0.2);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.status-stable { background: #ECFDF5; color: var(--success); }
.status-beta { background: #FEF3C7; color: var(--warning); }
.status-experimental { background: #EEF2FF; color: var(--primary); }
.status-idea { background: #F1F5F9; color: var(--text-muted); }

/* Channel Tabs & Table */
.channel-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.channel-tab {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.channel-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.version-table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.version-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.version-table th, .version-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
}

.version-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-main);
}

.version-table td.highlight {
  color: var(--primary);
  font-weight: 600;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 64px 0 32px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  font-size: 15px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 900;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Popup Overlay */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 2000;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius-xl);
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.popup-ic {
  font-size: 40px;
  margin-bottom: 12px;
}

.popup-btns {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-popup {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-full);
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel { background: var(--bg-tertiary); color: var(--text-secondary); }
.btn-confirm { background: var(--primary); color: #fff; }

/* Responsive */
@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .mobile-menu-btn { display: block; }
}
