/* ============================================================
   FS AI Detector — Production Stylesheet (Beginner Friendly)
   ============================================================ */

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

/* ---------- Colors (pehle :root me the, ab direct use honge) ----------
   bg-primary      : #0a0a0f
   bg-secondary    : #14141f
   border-color    : #1f1f2e
   border-hover    : #2a2a3e
   text-primary    : #e8e8e8
   text-secondary  : #aaa
   text-muted      : #666
   accent          : #7c5cff
   accent-dark     : #5c3cff
   success         : #22cc88
   danger          : #ff5566
   warning         : #ff8844
   warning-bg      : #2a1f0f
   warning-border  : #5c3c0f
---------------------------------------------------------------------- */

body {
  background: #0a0a0f;
  color: #e8e8e8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #7c5cff;
  color: #fff;
  padding: 16px;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  top: 0;
}

/* ---------- Container ---------- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

/* ---------- Header ---------- */
.header {
  background: rgba(15, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1f1f2e;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Logo ---------- */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  transition: opacity 0.2s ease;
}
.logo:hover {
  opacity: 0.85;
}

.logo-icon {
  font-size: 26px;
  line-height: 1;
}

.logo-text {
  font-size: 16px;
  letter-spacing: 0.5px;
}

.accent {
  color: #7c5cff;
}

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav a {
  color: #aaa;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  padding: 4px 0;
}
.nav a:hover,
.nav a:focus {
  color: #7c5cff;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #7c5cff;
  transition: width 0.2s ease;
}
.nav a:hover::after {
  width: 100%;
}
.nav a.active {
  color: #7c5cff;
}
.nav a.active::after {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 48px 0 24px;
}

.hero h1 {
  font-size: clamp(24px, 5vw, 38px);
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.subtitle {
  color: #aaa;
  font-size: clamp(14px, 2vw, 16px);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Trust badges ---------- */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.badge {
  background: #14141f;
  border: 1px solid #1f1f2e;
  color: #aaa;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Warning box ---------- */
.warning-box {
  background: #2a1f0f;
  border: 1px solid #5c3c0f;
  color: #ffcc88;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  margin-top: 24px;
  line-height: 1.5;
}

/* ---------- Main box (textarea area) ---------- */
.box {
  background: #14141f;
  border: 1px solid #1f1f2e;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hint {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ---------- Textarea ---------- */
textarea {
  width: 100%;
  min-height: 200px;
  background: #0a0a0f;
  color: #fff;
  border: 1px solid #2a2a3e;
  border-radius: 12px;
  padding: 16px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}
textarea::placeholder {
  color: #666;
}

/* ---------- Meta row (word count etc.) ---------- */
.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.warn-text {
  color: #ff8844;
}

/* ---------- Buttons ---------- */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #7c5cff, #5c3cff);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 16px;
  margin-top: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  font-family: inherit;
  touch-action: manipulation;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.4);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-primary:focus-visible {
  outline: 2px solid #7c5cff;
  outline-offset: 2px;
}

.inline-btn {
  display: inline-block;
  width: auto;
  margin-top: 16px;
  text-decoration: none;
  text-align: center;
}

/* ---------- Result box ---------- */
.result {
  display: none;
  margin-top: 24px;
  padding: 24px;
  border-radius: 12px;
  background: #0a0a0f;
  border: 1px solid #1f1f2e;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

/* ---------- Progress bar ---------- */
.bar {
  height: 10px;
  background: #222;
  border-radius: 6px;
  overflow: hidden;
  margin: 16px 0;
}

.fill {
  height: 100%;
  width: 0;
  transition: width 0.8s ease;
  border-radius: 6px;
}

.tag {
  font-size: 12px;
  color: #aaa;
  margin-top: 8px;
}

/* ---------- Loading spinner ---------- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #2a2a3e;
  border-top-color: #7c5cff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Feature cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 32px 0;
}

.card {
  background: #14141f;
  border: 1px solid #1f1f2e;
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: #2a2a3e;
}
.card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #7c5cff;
}
.card p {
  font-size: 14px;
  color: #aaa;
}

/* ---------- Article / content pages ---------- */
.content {
  background: #14141f;
  border: 1px solid #1f1f2e;
  border-radius: 16px;
  padding: 32px;
  margin: 24px 0;
}
.content h1 {
  font-size: 26px;
  margin-bottom: 16px;
}
.content h2 {
  font-size: 20px;
  margin: 24px 0 8px;
  color: #7c5cff;
}
.content h3 {
  font-size: 16px;
  margin: 16px 0 8px;
}
.content h4 {
  font-size: 15px;
  margin: 16px 0 4px;
}
.content p {
  margin-bottom: 8px;
  color: #ccc;
  font-size: 15px;
}
.content ul {
  margin: 8px 0 8px 24px;
  color: #ccc;
}
.content li {
  margin-bottom: 4px;
}
.content a {
  color: #7c5cff;
  text-decoration: none;
}
.content a:hover {
  text-decoration: underline;
}

/* ---------- Blog ---------- */
.blog-post {
  margin-bottom: 32px;
}
.blog-title {
  font-size: 22px;
  margin-bottom: 8px;
  color: #fff !important;
  line-height: 1.3;
}
.blog-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
  font-style: italic;
}

/* ---------- Form inputs ---------- */
input,
textarea.form-input {
  width: 100%;
  padding: 12px;
  background: #0a0a0f;
  color: #fff;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  margin-bottom: 16px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease;
}
input:focus,
textarea.form-input:focus {
  border-color: #7c5cff;
  outline: none;
}

label {
  display: block;
  font-size: 14px;
  color: #aaa;
  margin-bottom: 4px;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 32px 16px;
  margin-top: 48px;
  border-top: 1px solid #1f1f2e;
  color: #666;
  font-size: 13px;
}
.footer a {
  color: #aaa;
  text-decoration: none;
  margin: 0 4px;
  transition: color 0.2s ease;
}
.footer a:hover {
  color: #7c5cff;
}

/* ---------- Responsive: tablet ---------- */
@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .box {
    padding: 32px;
  }
  .hero {
    padding: 48px 0 32px;
  }
  .content {
    padding: 48px;
  }
}

/* ---------- Responsive: desktop ---------- */
@media (min-width: 1024px) {
  .container {
    padding: 0 24px;
  }
}

/* ---------- Reduced motion (accessibility) ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .header,
  .footer,
  .btn-primary,
  .warning-box {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}