:root {
      --bg: #050810;
      --card: rgba(13, 20, 38, 0.6);
      --card-2: rgba(255, 255, 255, 0.025);
      --border: rgba(255, 255, 255, 0.08);
      --primary: #6366f1;
      --primary-light: #818cf8;
      --accent: #2dd4bf;
      --warning: #f59e0b;
      --danger: #fb7185;
      --text-main: #f1f5f9;
      --text-dim: #94a3b8;
      --radius-2xl: 32px;
      --radius-xl: 20px;
    }

    * { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

    body {
      margin: 0;
      min-height: 100vh;
      background-color: var(--bg);
      color: var(--text-main);
      font-family: 'Plus Jakarta Sans', sans-serif;
      line-height: 1.5;
    }

    .blob {
      position: fixed;
      width: 500px;
      height: 500px;
      background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
      filter: blur(80px);
      z-index: -1;
      pointer-events: none;
    }

    .blob-1 { top: -100px; left: -100px; }
    .blob-2 { bottom: -100px; right: -100px; background: radial-gradient(circle, rgba(45, 212, 191, 0.1) 0%, transparent 70%); }

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

    header {
      text-align: center;
      margin-bottom: 34px;
    }

    .chip-top {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border);
      padding: 8px 16px;
      border-radius: 100px;
      font-size: 13px;
      font-weight: 600;
      color: var(--primary-light);
      margin-bottom: 20px;
    }

    .pulse-dot {
      width: 8px;
      height: 8px;
      background: var(--accent);
      border-radius: 50%;
      box-shadow: 0 0 12px var(--accent);
      animation: pulse 2s infinite;
    }

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

    h1 {
      font-size: clamp(2.4rem, 5vw, 3.75rem);
      font-weight: 800;
      letter-spacing: -0.05em;
      margin: 0 0 18px;
      background: linear-gradient(135deg, #fff 30%, #64748b 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .hero-desc {
      color: var(--text-dim);
      font-size: 1.08rem;
      max-width: 780px;
      margin: 0 auto;
    }

    .app-layout {
      display: grid;
      grid-template-columns: 1fr 380px;
      gap: 24px;
      margin-top: 34px;
    }

    .glass-panel {
      background: var(--card);
      backdrop-filter: blur(20px);
      border: 1px solid var(--border);
      border-radius: var(--radius-2xl);
      padding: 30px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    }

    .search-wrap {
      grid-column: 1 / -1;
      display: flex;
      gap: 14px;
      padding: 12px;
      background: rgba(255,255,255,0.02);
      border: 1px solid var(--border);
      border-radius: 100px;
      transition: all 0.3s ease;
    }

    .search-wrap:focus-within {
      border-color: var(--primary);
      background: rgba(99, 102, 241, 0.05);
      box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    }

    input, select {
      width: 100%;
      background: rgba(255,255,255,0.04);
      border: 1px solid var(--border);
      color: white;
      font-size: 0.96rem;
      font-family: inherit;
      outline: none;
      border-radius: 14px;
      padding: 12px 14px;
    }

    .search-wrap input {
      flex: 1;
      background: transparent;
      border: none;
      padding-left: 22px;
      font-size: 1.05rem;
    }

    label {
      display: block;
      color: var(--text-dim);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .05em;
      margin: 14px 0 7px;
    }

    .btn-main, .btn-secondary {
      border: none;
      border-radius: 100px;
      font-weight: 800;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      font-family: inherit;
    }

    .btn-main {
      background: var(--primary);
      color: white;
      padding: 14px 30px;
      box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
      white-space: nowrap;
    }

    .btn-secondary {
      background: rgba(255,255,255,0.06);
      color: white;
      border: 1px solid var(--border);
      padding: 11px 16px;
      width: 100%;
    }

    .btn-main:hover, .btn-secondary:hover { transform: translateY(-2px); }
    .btn-main:disabled { opacity: .55; cursor: not-allowed; transform: none; }

    .results-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      margin-bottom: 24px;
      gap: 18px;
    }

    .section-title { font-size: 1.35rem; font-weight: 800; margin: 0; }
    .section-subtitle { color: var(--text-dim); font-size: 0.9rem; margin-top: 4px; }

    .offer-card {
      background: var(--card-2);
      border: 1px solid var(--border);
      padding: 22px;
      border-radius: var(--radius-xl);
      margin-bottom: 16px;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 20px;
      transition: all 0.3s ease;
    }

    .offer-card:hover {
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(99, 102, 241, 0.3);
      transform: scale(1.01);
    }

    .offer-info h3 { margin: 0 0 8px; font-size: 1.06rem; font-weight: 700; line-height: 1.35; }
    .tag-container { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

    .tag {
      font-size: 11px;
      padding: 4px 10px;
      border-radius: 6px;
      background: rgba(255,255,255,0.05);
      color: var(--text-dim);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .offer-price { text-align: right; display: flex; flex-direction: column; justify-content: center; min-width: 130px; }
    .price-value { color: var(--accent); font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; }
    .link-out { color: var(--primary-light); text-decoration: none; font-size: 0.85rem; font-weight: 800; margin-top: 8px; }

    .side-stack {
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .summary-box { height: fit-content; }

    .ai-badge, .warn-badge {
      display: inline-flex;
      padding: 4px 12px;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 800;
      color: white;
      margin-bottom: 14px;
      letter-spacing: .03em;
    }

    .ai-badge { background: linear-gradient(90deg, rgba(99,102,241,0.2), rgba(45,212,191,0.2)); }
    .warn-badge { background: rgba(245, 158, 11, 0.18); color: #fde68a; }

    .summary-text {
      color: var(--text-dim);
      font-size: 0.98rem;
      line-height: 1.7;
      white-space: pre-wrap;
    }

    .summary-text b { color: #fff; }

    .loading-status {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 14px;
      color: var(--text-dim);
      margin-top: 20px;
    }

    .loader {
      width: 18px;
      height: 18px;
      border: 2px solid rgba(255,255,255,0.1);
      border-top-color: var(--primary);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

    .notice {
      background: rgba(245, 158, 11, 0.08);
      border: 1px solid rgba(245, 158, 11, 0.18);
      color: #fde68a;
      border-radius: 16px;
      padding: 14px;
      font-size: 0.86rem;
      line-height: 1.55;
      margin-top: 14px;
    }

    .settings-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
    .checkbox-row { display: flex; align-items: center; gap: 10px; margin: 13px 0; color: var(--text-dim); font-size: .92rem; }
    .checkbox-row input { width: auto; }

    @keyframes spin { to { transform: rotate(360deg); } }

    @media (max-width: 950px) {
      .app-layout { grid-template-columns: 1fr; }
      h1 { font-size: 2.5rem; }
      .search-wrap { flex-direction: column; border-radius: 26px; }
      .search-wrap input { padding: 14px; }
      .btn-main { width: 100%; }
      .offer-card { grid-template-columns: 1fr; }
      .offer-price { text-align: left; }
    }
