 *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --blue:        #525fe1;
      --blue-light:  #6b78f5;
      --orange:      #f86f03;
      --orange-glow: rgba(248,111,3,0.18);
      --bg:          #0e0e14;
      --card:        #16161f;
      --card-border: rgba(255,255,255,0.07);
      --text:        #f0f0f8;
      --muted:       #7a7a9a;
      --track-bg:    #2a2a3a;
      --track-fill:  var(--orange);
    }

  body {
      font-family: 'DM Sans', sans-serif;
      background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0d1033 100%);
      color: #f0f0f8;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* ── Section header ─────────────────────────────── */
    .section-header {
      text-align: center;
      margin-bottom: 60px;
      animation: fadeUp 0.6s ease both;
    }
    .section-label {
      display: inline-block;
      font-family: 'DM Sans', sans-serif;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--orange);
      background: var(--orange-glow);
      border: 1px solid rgba(248,111,3,0.25);
      padding: 6px 16px;
      border-radius: 100px;
      margin-bottom: 18px;
    }
    .a-section-title {
      font-family: 'Syne', sans-serif;
      font-size: clamp(32px, 5vw, 52px);
      font-weight: 800;
      line-height: 1.1;
      letter-spacing: -0.02em;
      color: var(--text);
    }
    .section-title span {
      color: var(--blue-light);
    }
    .section-sub {
      margin-top: 14px;
      font-size: 16px;
      color: var(--muted);
      max-width: 480px;
      margin-inline: auto;
      line-height: 1.6;
    }

    /* ── Grid ───────────────────────────────────────── */
    .agents-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
      gap: 20px;
      max-width: 1100px;
      margin: 0 auto;
    }

    /* ── Agent Card ─────────────────────────────────── */
    .agent-card {
      background: var(--card);
      border: 1px solid var(--card-border);
      border-radius: 18px;
      padding: 24px 24px 20px;
      transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
      animation: fadeUp 0.6s ease both;
      position: relative;
      overflow: hidden;
    }
    .agent-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--blue), var(--orange));
      opacity: 0;
      transition: opacity 0.3s;
    }
    .agent-card:hover {
      border-color: rgba(82,95,225,0.3);
      transform: translateY(-4px);
      box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(82,95,225,0.15);
    }
    .agent-card:hover::before { opacity: 1; }
    .agent-card:nth-child(1) { animation-delay: 0.05s; }
    .agent-card:nth-child(2) { animation-delay: 0.10s; }
    .agent-card:nth-child(3) { animation-delay: 0.15s; }
    .agent-card:nth-child(4) { animation-delay: 0.20s; }
    .agent-card:nth-child(5) { animation-delay: 0.25s; }
    .agent-card:nth-child(6) { animation-delay: 0.30s; }
    .agent-card:nth-child(7) { animation-delay: 0.35s; }

    /* Agent info row */
    .agent-info {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 20px;
    }
    .agent-avatar {
      width: 48px; height: 48px;
      border-radius: 14px;
      background: linear-gradient(135deg, #1e1e30, #2a2a45);
      border: 1px solid rgba(82,95,225,0.3);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      position: relative;
      overflow: hidden;
    }
    .agent-avatar svg {
      width: 26px; height: 26px;
    }
    /* Pulse ring when playing */
    .agent-avatar.playing::after {
      content: '';
      position: absolute;
      inset: -4px;
      border-radius: 18px;
      border: 2px solid var(--orange);
      animation: pulse-ring 1.2s ease-out infinite;
    }
    @keyframes pulse-ring {
      0%   { opacity: 1; transform: scale(1); }
      100% { opacity: 0; transform: scale(1.3); }
    }

    .agent-meta { flex: 1; min-width: 0; }
    .agent-name {
      font-family: 'Syne', sans-serif;
      font-size: 17px;
      font-weight: 700;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .agent-role {
      font-size: 12px;
      font-weight: 500;
      color: var(--muted);
      margin-top: 2px;
    }

    /* Waveform bars (decorative, animates when playing) */
    .waveform-bars {
      display: flex;
      align-items: center;
      gap: 3px;
      height: 20px;
      margin-left: auto;
    }
    .waveform-bars span {
      display: block;
      width: 3px;
      border-radius: 2px;
      background: var(--track-bg);
      transition: background 0.3s;
    }
    .waveform-bars span:nth-child(1) { height: 8px;  animation: wave 0.9s ease-in-out infinite; }
    .waveform-bars span:nth-child(2) { height: 14px; animation: wave 0.9s ease-in-out infinite 0.15s; }
    .waveform-bars span:nth-child(3) { height: 20px; animation: wave 0.9s ease-in-out infinite 0.3s; }
    .waveform-bars span:nth-child(4) { height: 12px; animation: wave 0.9s ease-in-out infinite 0.45s; }
    .waveform-bars span:nth-child(5) { height: 6px;  animation: wave 0.9s ease-in-out infinite 0.6s; }

    .waveform-bars.active span { background: var(--orange); }

    @keyframes wave {
      0%, 100% { transform: scaleY(1); }
      50%       { transform: scaleY(0.4); }
    }
    /* Only animate if .active */
    .waveform-bars:not(.active) span { animation-play-state: paused; }

    /* ── Player controls ────────────────────────────── */
    .player {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    /* Play/pause button */
    .play-btn {
      width: 38px; height: 38px;
      border-radius: 50%;
      background: var(--orange);
      border: none;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
      box-shadow: 0 4px 14px rgba(248,111,3,0.3);
    }
    .play-btn:hover {
      background: #e05e00;
      transform: scale(1.08);
      box-shadow: 0 6px 22px rgba(248,111,3,0.45);
    }
    .play-btn:active { transform: scale(0.95); }
    .play-btn svg { width: 14px; height: 14px; fill: #fff; }

    /* Progress track */
    .progress-wrap {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .progress-track {
      width: 100%;
      height: 4px;
      background: var(--track-bg);
      border-radius: 2px;
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }
    .progress-track::after {
      content: '';
      position: absolute;
      left: 0; top: 0; bottom: 0;
      width: var(--pct, 0%);
      background: linear-gradient(90deg, var(--blue-light), var(--orange));
      border-radius: 2px;
      transition: width 0.1s linear;
    }
    input[type=range].progress-input {
      position: absolute;
      inset: -6px 0;
      width: 100%;
      opacity: 0;
      cursor: pointer;
      height: 16px;
    }

    .time-row {
      display: flex;
      justify-content: space-between;
    }
    .time-current { font-size: 11px; font-weight: 600; color: var(--orange); }
    .time-total   { font-size: 11px; color: var(--muted); }

    /* Volume */
    .volume-wrap {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }
    .vol-icon {
      color: var(--muted);
      font-size: 14px;
      cursor: pointer;
      transition: color 0.2s;
      user-select: none;
    }
    .vol-icon:hover { color: var(--text); }
    input[type=range].vol-slider {
      -webkit-appearance: none;
      width: 68px;
      height: 3px;
      background: var(--track-bg);
      border-radius: 2px;
      outline: none;
      cursor: pointer;
    }
    input[type=range].vol-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 12px; height: 12px;
      border-radius: 50%;
      background: var(--blue-light);
      cursor: pointer;
      transition: background 0.2s, transform 0.15s;
    }
    input[type=range].vol-slider::-webkit-slider-thumb:hover {
      background: var(--orange);
      transform: scale(1.3);
    }

    /* ── Animations ─────────────────────────────────── */
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(24px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── Responsive ─────────────────────────────────── */
    @media (max-width: 600px) {
      .agents-grid { grid-template-columns: 1fr; }
      input[type=range].vol-slider { width: 50px; }
    }

    /* hidden native audio */
    audio { display: none; }