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

    :root {
      --bg: #0f0f17;
      --surface: #1a1a2e;
      --surface2: rgba(255,255,255,0.04);
      --border: rgba(255,255,255,0.08);
      --accent: #8b5cf6;
      --accent2: #6d28d9;
      --text: #f1f5f9;
      --muted: #64748b;
      --green: #10b981;
    }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      min-height: 100vh;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background:
        radial-gradient(ellipse 70% 40% at 50% -10%, rgba(139,92,246,0.12), transparent),
        radial-gradient(ellipse 50% 30% at 90% 90%, rgba(109,40,217,0.08), transparent);
      pointer-events: none;
      z-index: 0;
    }

    /* NAV */
    nav {
      position: sticky;
      top: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1rem 2rem;
      background: rgba(15,15,23,0.85);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 1.2rem;
      font-weight: 800;
      text-decoration: none;
    }

    .logo-icon {
      width: 30px; height: 30px;
      background: linear-gradient(135deg, #8b5cf6, #6d28d9);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.9rem;
    }

    .logo-text {
      background: linear-gradient(135deg, #a78bfa, #818cf8);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 1.75rem;
      list-style: none;
    }

    .nav-links a {
      color: var(--muted);
      text-decoration: none;
      font-size: 0.9rem;
      transition: color 0.2s;
    }

    .nav-links a:hover { color: var(--text); }

    .nav-cta {
      padding: 0.5rem 1.25rem;
      background: linear-gradient(135deg, #8b5cf6, #6d28d9);
      color: white !important;
      border-radius: 8px;
      font-weight: 600 !important;
      font-size: 0.85rem !important;
    }

    /* HERO */
    .hero {
      text-align: center;
      padding: 4rem 1.5rem 2rem;
      position: relative;
      z-index: 1;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      background: rgba(139,92,246,0.1);
      border: 1px solid rgba(139,92,246,0.25);
      border-radius: 100px;
      padding: 0.3rem 0.9rem;
      font-size: 0.78rem;
      color: #a78bfa;
      margin-bottom: 1.5rem;
    }

    .badge-dot {
      width: 5px; height: 5px;
      border-radius: 50%;
      background: #8b5cf6;
      animation: pulse 2s infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.4; transform: scale(1.6); }
    }

    .hero h1 {
      font-size: clamp(2rem, 5vw, 3.5rem);
      font-weight: 800;
      line-height: 1.15;
      letter-spacing: -0.02em;
      margin-bottom: 1rem;
    }

    .hero h1 span {
      background: linear-gradient(135deg, #a78bfa, #818cf8, #34d399);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .hero p {
      color: var(--muted);
      font-size: 1.05rem;
      max-width: 500px;
      margin: 0 auto 2rem;
      line-height: 1.7;
    }

    /* TOOL */
    .tool-wrapper {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0 1.5rem 3rem;
      position: relative;
      z-index: 1;
    }

    .tool-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 20px;
      overflow: hidden;
    }

    .tool-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.85rem 1.25rem;
      border-bottom: 1px solid var(--border);
      background: rgba(255,255,255,0.02);
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    .mode-tabs {
      display: flex;
      gap: 0.35rem;
    }

    .mode-tab {
      padding: 0.35rem 0.85rem;
      border-radius: 6px;
      border: 1px solid transparent;
      font-size: 0.82rem;
      cursor: pointer;
      transition: all 0.2s;
      color: var(--muted);
      background: transparent;
    }

    .mode-tab.active {
      background: rgba(139,92,246,0.15);
      border-color: rgba(139,92,246,0.3);
      color: #a78bfa;
    }

    .tool-panels {
      display: grid;
      grid-template-columns: 1fr 1fr;
      min-height: 320px;
    }

    .tool-actions {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1.5rem;
      padding: 1rem 1.25rem;
      border-top: 1px solid var(--border);
    }

    .panel {
      display: flex;
      flex-direction: column;
    }

    .panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.75rem 1.25rem;
      border-bottom: 1px solid var(--border);
      font-size: 0.8rem;
      color: var(--muted);
    }

    .panel-header .label { font-weight: 600; color: var(--text); }

    .word-count { font-size: 0.78rem; color: var(--muted); }

    textarea {
      flex: 1;
      width: 100%;
      padding: 1.25rem;
      background: transparent;
      border: none;
      outline: none;
      color: var(--text);
      font-size: 0.95rem;
      line-height: 1.7;
      resize: none;
      font-family: inherit;
    }

    textarea::placeholder { color: #3d4a5c; }

    .output-text {
      flex: 1;
      padding: 1.25rem;
      font-size: 0.95rem;
      line-height: 1.7;
      color: var(--text);
      white-space: pre-wrap;
      word-wrap: break-word;
      min-height: 200px;
    }

    .output-placeholder {
      color: #3d4a5c;
      font-style: italic;
    }

    .panel-footer {
      padding: 0.75rem 1.25rem;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
    }

    .divider-col {
      width: 1px;
      background: var(--border);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 1.5rem 0;
      position: relative;
    }

    .humanize-btn {
      writing-mode: horizontal-tb;
      padding: 0.85rem 1.5rem;
      background: linear-gradient(135deg, #8b5cf6, #6d28d9);
      color: white;
      border: none;
      border-radius: 12px;
      font-size: 0.95rem;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
      box-shadow: 0 4px 20px rgba(139,92,246,0.3);
      position: relative;
      z-index: 2;
    }

    .humanize-btn:hover { opacity: 0.9; transform: scale(1.03); }
    .humanize-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

    .score-bar-wrap {
      margin-top: 0.5rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.25rem;
    }

    .score-label { font-size: 0.7rem; color: var(--muted); white-space: nowrap; }

    .score-bar {
      width: 6px;
      height: 60px;
      background: var(--border);
      border-radius: 3px;
      overflow: hidden;
      position: relative;
    }

    .score-fill {
      position: absolute;
      bottom: 0;
      width: 100%;
      background: linear-gradient(to top, #10b981, #34d399);
      border-radius: 3px;
      transition: height 0.8s ease;
      height: 0%;
    }

    .score-pct { font-size: 0.72rem; font-weight: 700; color: var(--green); white-space: nowrap; }

    .btn-small {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.4rem 0.85rem;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 7px;
      color: var(--muted);
      font-size: 0.8rem;
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-small:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

    .processing {
      display: none;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      font-size: 0.9rem;
      color: #a78bfa;
      padding: 0.25rem 0;
    }

    .processing.show { display: flex; }

    .spinner {
      width: 14px; height: 14px;
      border: 2px solid rgba(139,92,246,0.2);
      border-top-color: #8b5cf6;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }

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

    /* FEATURES */
    .features {
      max-width: 1100px;
      margin: 0 auto;
      padding: 2rem 1.5rem 5rem;
      position: relative;
      z-index: 1;
    }

    .features h2 {
      text-align: center;
      font-size: 1.75rem;
      font-weight: 700;
      margin-bottom: 0.75rem;
    }

    .features > p {
      text-align: center;
      color: var(--muted);
      margin-bottom: 2.5rem;
    }

    .features-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 1.25rem;
    }

    .feat {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1.5rem;
      transition: border-color 0.2s, transform 0.2s;
    }

    .feat:hover { border-color: rgba(139,92,246,0.25); transform: translateY(-2px); }
    .feat-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
    .feat-title { font-weight: 600; margin-bottom: 0.4rem; }
    .feat-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

    .det-row { display:flex; flex-direction:column; align-items:flex-start; gap:0.25rem; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.06); border-radius:9px; padding:0.6rem 0.85rem; }
    .det-status.passed { color:#10b981 !important; }

    /* COOKIE BANNER */
    #cookie-banner {
      position: fixed;
      bottom: 1.5rem;
      left: 50%;
      transform: translateX(-50%);
      z-index: 1000;
      width: min(540px, calc(100vw - 2rem));
      background: rgba(12,12,22,0.97);
      backdrop-filter: blur(20px);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 1.25rem 1.5rem;
      display: flex;
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;
      box-shadow: 0 8px 40px rgba(0,0,0,0.6);
      animation: slideUp 0.4s ease;
    }

    @keyframes slideUp {
      from { opacity: 0; transform: translateX(-50%) translateY(16px); }
      to   { opacity: 1; transform: translateX(-50%) translateY(0); }
    }

    #cookie-banner p { flex: 1; font-size: 0.85rem; color: var(--muted); min-width: 200px; line-height: 1.5; }
    #cookie-banner a { color: #a78bfa; text-decoration: none; }
    .cookie-btns { display: flex; gap: 0.5rem; flex-shrink: 0; }

    .cookie-accept {
      padding: 0.5rem 1.25rem;
      background: linear-gradient(135deg, #8b5cf6, #6d28d9);
      color: white; border: none; border-radius: 8px;
      font-size: 0.85rem; font-weight: 600; cursor: pointer;
    }

    .cookie-decline {
      padding: 0.5rem 1rem;
      background: transparent; color: var(--muted);
      border: 1px solid var(--border); border-radius: 8px;
      font-size: 0.85rem; cursor: pointer;
    }

    footer {
      text-align: center;
      padding: 2rem;
      color: var(--muted);
      font-size: 0.82rem;
      border-top: 1px solid var(--border);
      position: relative;
      z-index: 1;
    }

    footer a { color: var(--muted); text-decoration: none; }
    footer a:hover { color: var(--text); }

    @media (max-width: 700px) {
      .tool-panels { grid-template-columns: 1fr; }
      .divider-col { width: 100%; height: 1px; flex-direction: row; padding: 0 1.5rem; }
      .humanize-btn { width: 100%; }
      .nav-links { display: none; }
    }
