/* =========================
   RESET
========================= */
body {
  font-family: "Inter", sans-serif;
}

* {
  transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;

  background: #0f172a;
  color: white;
}

/* =========================
   NAVBAR PREMIUM SAAS
========================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 999;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 14px 24px;

  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);

  border-bottom: 1px solid rgba(255,255,255,0.08);

  transition: 0.3s;
}

/* =========================
   LOGO
========================= */
.logo {
  font-size: 18px;
  font-weight: 700;

  background: linear-gradient(135deg, #3b82f6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================
   NAV LINKS BOX STYLE
========================= */
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* BOX MENU */
.nav-links a {
  padding: 8px 12px;
  border-radius: 10px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);

  color: white;
  text-decoration: none;

  font-size: 14px;

  transition: 0.25s ease;

  display: flex;
  align-items: center;
}

/* HOVER EFFECT */
.nav-links a:hover {
  transform: translateY(-2px);

  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
}

/* ACTIVE MENU */
.nav-links a.active {
  background: rgba(59,130,246,0.25);
  border: 1px solid rgba(59,130,246,0.5);
}

/*

/* =========================
   LANDING PAGE
========================= */
.hero {
  text-align: center;
  padding: 80px 20px;
}

.hero h1 {
  font-size: 42px;
}

.hero span {
  color: #3b82f6;
}

.btn-big {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 20px;

  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: 12px;

  color: white;
  text-decoration: none;
}

/* =========================
   APP CONTAINER
========================= */
.container {
  max-width: 850px;
  margin: 40px auto;
  padding: 24px;

  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;

  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* TOP BAR */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

/* =========================
   INPUT
========================= */
textarea {
  width: 100%;
  height: 120px;

  margin-top: 10px;
  padding: 12px;

  border-radius: 12px;
  border: none;
  outline: none;

  background: rgba(255,255,255,0.08);
  color: white;

  resize: none;
}

/* SELECT MODE */
select {
  width: 100%;
  padding: 10px;

  margin-top: 10px;

  border-radius: 10px;
  border: none;

  background: rgba(255,255,255,0.08);
  color: white;
}

/* =========================
   BUTTON
========================= */
button {
  width: 100%;
  margin-top: 10px;

  padding: 12px;

  border: none;
  border-radius: 12px;

  background: linear-gradient(135deg, #3b82f6, #6366f1);

  color: white;
  font-weight: bold;

  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  transform: scale(1.02);
}

/* =========================
   WORD COUNT
========================= */
#wordCount {
  text-align: right;
  font-size: 13px;
  opacity: 0.7;
  margin-top: 5px;
}

/* =========================
   CHAT BUBBLE
========================= */
.chat-box {
  margin-top: 20px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  max-height: 400px;
  overflow-y: auto;

  padding-right: 5px;
}

.msg-user {
  align-self: flex-end;

  background: #3b82f6;
  color: white;
  padding: 10px 14px;
  border-radius: 14px 14px 0 14px;
  max-width: 75%;
}

.msg-ai {
  align-self: flex-start;

background: rgba(255,255,255,0.08);
  padding: 10px 14px;
  border-radius: 14px 14px 14px 0;
  max-width: 75%;
}

/* =========================
   LOADING
========================= */
.loading {
  margin-top: 10px;
  text-align: center;
}

.hidden {
  display: none;
}

.spinner {
  width: 28px;
  height: 28px;

  margin: auto;

  border: 3px solid rgba(255,255,255,0.2);
  border-top: 3px solid #3b82f6;

  border-radius: 50%;

  animation: spin 0.8s linear infinite;
}

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

/* =========================
   LOGIN (basic)
========================= */
.auth {
  display: flex;
  justify-content: center;
  align-items: center;

  height: 100vh;
}

.auth-box {
  display: flex;
  flex-direction: column;
  gap: 10px;

  padding: 20px;

  background: rgba(255,255,255,0.06);
  border-radius: 15px;

  width: 300px;
}

/* =========================
   LIGHT MODE
========================= */
body.light {
  background: #f1f5f9;
  color: #0f172a;
}

body.light .container {
  background: white;
  color: black;
}

body.light textarea,
body.light select {
  background: #f1f5f9;
  color: black;
}

body.light .msg-ai {
  background: #e2e8f0;
  color: black;
}

body.light .navbar {
  background: rgba(255,255,255,0.8);
}

body.light .nav-links a {
  color: black;
}

.features {
  padding: 80px 20px;
  text-align: center;
}

.features h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

.sub {
  opacity: 0.7;
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;

  max-width: 900px;
  margin: auto;
}

.feature-card {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 15px;

  border: 1px solid rgba(255,255,255,0.08);

  transition: 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.08);
}

/* LIGHT MODE */
body.light .feature-card {
  background: white;
  color: black;
  border: 1px solid rgba(0,0,0,0.1);
}

/* =========================
   RESPONSIVE NAVBAR (HP)
========================= */
@media (max-width: 768px) {

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-links {
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }

  .nav-links a {
    font-size: 13px;
    padding: 7px 10px;

    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .cta-btn {
    flex: 1;
    text-align: center;
  }

  .dark-toggle {
    width: 32px;
    height: 32px;
  }
}

.copy-btn {
  margin-top: 8px;

  padding: 6px 10px;
  font-size: 12px;

  border: none;
  border-radius: 8px;

  cursor: pointer;

  background: rgba(255,255,255,0.1);
  color: white;

  transition: 0.2s;

  display: inline-block;
}

.copy-btn:hover {
  background: rgba(59,130,246,0.3);
  transform: scale(1.05);
}

/* LIGHT MODE */
body.light .copy-btn {
  background: rgba(0,0,0,0.05);
  color: black;
}