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

    body {
      font-family: 'Segoe UI', system-ui, sans-serif;
      background: #0f0f13;
      color: #e8e8f0;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 40px 16px 60px;
    }

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

    .header h1 {
      font-size: 2rem;
      font-weight: 800;
      background: linear-gradient(135deg, #a78bfa, #60a5fa, #34d399);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin-bottom: 8px;
    }

    .header p {
      color: #9ca3af;
      font-size: 0.95rem;
    }

    .card {
      background: #18181f;
      border: 1px solid #2a2a38;
      border-radius: 16px;
      padding: 28px;
      width: 100%;
      max-width: 680px;
      margin-bottom: 24px;
    }

    label {
      display: block;
      font-size: 0.85rem;
      font-weight: 600;
      color: #a0a0b8;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 8px;
    }

    textarea, select, input[type="text"] {
      width: 100%;
      background: #0f0f13;
      border: 1px solid #2a2a38;
      border-radius: 10px;
      color: #e8e8f0;
      font-size: 0.95rem;
      padding: 12px 14px;
      transition: border-color 0.2s;
      outline: none;
      resize: vertical;
    }

    textarea:focus, select:focus, input[type="text"]:focus {
      border-color: #7c6bff;
    }

    textarea { min-height: 90px; }

    .row {
      display: flex;
      gap: 14px;
      margin-top: 16px;
      flex-wrap: wrap;
    }

    .row > div { flex: 1; min-width: 140px; }

    select option { background: #18181f; }

    .platforms {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 8px;
    }

    .platform-btn {
      background: #0f0f13;
      border: 1px solid #2a2a38;
      border-radius: 8px;
      color: #9ca3af;
      cursor: pointer;
      font-size: 0.85rem;
      padding: 7px 14px;
      transition: all 0.18s;
      user-select: none;
    }

    .platform-btn.active {
      background: #1e1b4b;
      border-color: #7c6bff;
      color: #a78bfa;
      font-weight: 600;
    }

    .generate-btn {
      width: 100%;
      padding: 14px;
      background: linear-gradient(135deg, #7c6bff, #5b8def);
      border: none;
      border-radius: 12px;
      color: #fff;
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      margin-top: 20px;
      transition: opacity 0.2s, transform 0.1s;
    }

    .generate-btn:hover { opacity: 0.9; }
    .generate-btn:active { transform: scale(0.98); }
    .generate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

    .loading {
      display: none;
      text-align: center;
      padding: 28px 0;
      color: #7c6bff;
    }

    .loading .spinner {
      width: 36px; height: 36px;
      border: 3px solid #2a2a38;
      border-top-color: #7c6bff;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      margin: 0 auto 12px;
    }

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

    .results-section { width: 100%; max-width: 680px; }

    .result-card {
      background: #18181f;
      border: 1px solid #2a2a38;
      border-radius: 14px;
      margin-bottom: 16px;
      overflow: hidden;
    }

    .result-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      background: #1e1e2a;
      border-bottom: 1px solid #2a2a38;
    }

    .platform-label {
      display: flex;
      align-items: center;
      gap: 8px;
      font-weight: 700;
      font-size: 0.9rem;
    }

    .platform-icon { font-size: 1.1rem; }

    .copy-btn {
      background: #2a2a38;
      border: none;
      border-radius: 7px;
      color: #a0a0b8;
      cursor: pointer;
      font-size: 0.78rem;
      padding: 5px 11px;
      transition: all 0.18s;
    }

    .copy-btn:hover { background: #7c6bff; color: #fff; }

    .result-body {
      padding: 16px;
      font-size: 0.93rem;
      line-height: 1.65;
      color: #d0d0e8;
      white-space: pre-wrap;
      word-break: break-word;
    }

    .hashtags {
      padding: 10px 16px 14px;
      border-top: 1px solid #1e1e2a;
      color: #60a5fa;
      font-size: 0.83rem;
      line-height: 1.7;
    }

    .error-box {
      display: none;
      background: #2d1010;
      border: 1px solid #7f1d1d;
      border-radius: 10px;
      color: #fca5a5;
      padding: 14px 16px;
      font-size: 0.9rem;
      margin-top: 16px;
      width: 100%;
      max-width: 680px;
    }