:root {
    --bg: #ffffff;
    --surface: #fafafa;
    --border: #e5e5e5;
    --text: #0a0a0a;
    --text-muted: #737373;
    --accent: #0a0a0a;
    --accent-text: #ffffff;
    --hover: #f5f5f5;
    --shadow: 0 1px 2px rgba(0,0,0,0.04);
    --radius: 10px;
  }
  html[data-theme="dark"] {
    --bg: #0a0a0a;
    --surface: #141414;
    --border: #262626;
    --text: #fafafa;
    --text-muted: #a3a3a3;
    --accent: #fafafa;
    --accent-text: #0a0a0a;
    --hover: #1c1c1c;
    --shadow: 0 1px 2px rgba(0,0,0,0.3);
  }

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

  html { scroll-behavior: smooth; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
  }

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

  header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 40px;
  }

  .header-text h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
  }

  .subtitle {
    font-size: 14px;
    color: var(--text-muted);
  }

  .theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  }
  .theme-toggle:hover { background: var(--hover); }
  .theme-toggle:active { transform: scale(0.95); }
  .theme-toggle svg { width: 18px; height: 18px; transition: opacity 0.3s ease, transform 0.3s ease; }
  .theme-toggle .icon-sun { display: none; }
  html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
  html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

  .controls { margin-bottom: 32px; }

  .search-box { position: relative; margin-bottom: 16px; }
  .search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
  }
  .search-box input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    font-size: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color 0.2s ease, background 0.2s ease;
    font-family: inherit;
  }
  .search-box input:focus {
    outline: none;
    border-color: var(--text);
    background: var(--bg);
  }
  .search-box input::placeholder { color: var(--text-muted); }

  .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .sport-btn {
    padding: 8px 14px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
  }
  .sport-btn:hover { background: var(--hover); }
  .sport-btn:active { transform: scale(0.97); }
  .sport-btn.active {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
  }

  .stats {
    display: flex;
    gap: 32px;
    padding: 16px 0;
    margin: 24px 0 32px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .stat-item { display: flex; flex-direction: column; gap: 2px; }
  .stat-number { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
  .stat-label { font-size: 12px; color: var(--text-muted); }

  .sport-section { margin-bottom: 48px; animation: fadeIn 0.4s ease; }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .sport-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  .sport-icon { font-size: 20px; }
  .sport-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
  .headline-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
  }

  .headlines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
  }

  .headline-card {
    background: var(--surface);
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }
  .headline-card:hover {
    background: var(--hover);
    border-color: var(--text-muted);
  }
  .headline-card:active { transform: scale(0.995); }

  .headline-text {
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    word-break: break-word;
  }

  .copy-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
    font-family: inherit;
    flex-shrink: 0;
  }
  .headline-card:hover .copy-btn { opacity: 1; }
  .copy-btn:hover {
    background: var(--accent);
    color: var(--accent-text);
  }
  .copy-btn.copied {
    opacity: 1;
    color: var(--text);
    background: var(--hover);
  }

  .no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
  }
  .no-results h2 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
  .no-results p { font-size: 14px; }

  .loading {
    text-align: center;
    padding: 60px;
    font-size: 14px;
    color: var(--text-muted);
  }

  @media (max-width: 640px) {
    .container { padding: 24px 16px 60px; }
    header { flex-direction: row; align-items: flex-start; }
    .header-text h1 { font-size: 22px; }
    .stats { gap: 20px; }
    .headlines-grid { grid-template-columns: 1fr; }
  }
