/* 广东城际拥堵指数系统 - 主样式表 */
/* 版本: 2.0 | 最后更新: 2023-12-01 */

/* ========== 基础样式 ========== */
:root {
    --highlight: #ff6600;
    --highlight-darker: #cc5200;
    --bg-color: #000;
    --text-color: #fff;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.1);
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
  }
  
  /* ========== 工具类 ========== */
  .highlight {
    color: var(--highlight);
  }
  
  .highlight-bg {
    background-color: var(--highlight);
  }
  
  .tech-border {
    border: 1px solid var(--border-color);
    background: rgba(15, 15, 15, 0.5);
    backdrop-filter: blur(10px);
  }
  
  /* ========== 布局 ========== */
  .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  /* ========== 动画 ========== */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.1; }
  }
  
  @keyframes dash {
    to {
      stroke-dashoffset: 0;
    }
  }
  
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  
  .loaded .reveal {
    opacity: 1;
    transform: translateY(0);
  }
  
  .animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
  }
  
  .animate-dash {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 3s ease-in-out forwards;
  }
  
  .pulse-slow {
    animation: pulse 4s ease-in-out infinite;
  }
  
  /* ========== 导航栏 ========== */
  nav {
    position: fixed;
    width: 100%;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
  }
  
  /* ========== 英雄区域 ========== */
  .mega-text {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.2;
    font-weight: 900;
  }
  
  .gradient-overlay {
    background: radial-gradient(circle, var(--highlight) 0%, rgba(255,102,0,0.1) 70%);
  }
  
  /* ========== 地图区域 ========== */
  .map-container {
    min-height: 500px;
    background-color: rgba(0, 0, 0, 0.3);
  }
  
  /* ========== 拥堵指示器 ========== */
  .congestion-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
  }
  
  .congestion-0 { background-color: #10b981; }
  .congestion-1 { background-color: #d9f99d; }
  .congestion-2 { background-color: #f59e0b; }
  .congestion-3 { background-color: #f97316; }
  .congestion-4 { background-color: #ef4444; }
  .congestion-5 { background-color: #7f1d1d; }
  
  /* ========== 表单元素 ========== */
  input,
  select,
  textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    width: 100%;
    transition: border-color 0.3s ease;
  }
  
  input:focus,
  select:focus,
  textarea:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.2);
  }
  
  /* ========== 按钮 ========== */
  button {
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  /* ========== AI 分析区域 ========== */
  #ai-status-wrapper {
    min-height: 300px;
  }
  
  .manual-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease;
  }
  
  .manual-option:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .manual-option input[type="radio"] {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    transition: all 0.3s ease;
  }
  
  .manual-option input[type="radio"]:checked {
    border-color: var(--highlight);
    background-color: var(--highlight);
  }
  
  /* ========== 通知 ========== */
  .toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    z-index: 100;
    animation: fadeInUp 0.3s ease forwards;
  }
  
  .toast-success {
    background-color: #10B981;
    color: white;
  }
  
  .toast-error {
    background-color: #EF4444;
    color: white;
  }
  
  .toast.fade-out {
    animation: fadeIn 0.3s ease reverse forwards;
  }
  
  /* ========== 加载状态 ========== */
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  .animate-spin {
    animation: spin 1s linear infinite;
  }
  
  /* ========== 响应式设计 ========== */
  @media (max-width: 768px) {
    .grid-cols-1 > div {
      margin-bottom: 2rem;
    }
    
    #info-board {
      max-height: 300px;
    }
  }
  
  @media (max-width: 640px) {
    .mega-text {
      font-size: 2.5rem;
    }
    
    .map-container {
      min-height: 350px;
    }
  }
  
  /* ========== 打印样式 ========== */
  @media print {
    nav, footer, #api-config, #submit {
      display: none;
    }
    
    body {
      background-color: white;
      color: black;
    }
    
    .map-container {
      min-height: 0;
      height: 500px;
    }
  }