/* ============================================================
   SuryaMukhi AI — Global Stylesheet
   Color palette: Sunflower gold #f59e0b, Sky blue #3b82f6,
   Deep navy #0f172a, Warm white #fefce8
   ============================================================ */

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

:root {
  --gold:    #f59e0b;
  --gold-l:  #fbbf24;
  --blue:    #2563eb;
  --blue-l:  #3b82f6;
  --navy:    #0f172a;
  --navy2:   #1e293b;
  --slate:   #334155;
  --muted:   #94a3b8;
  --warm:    #fffbeb;
  --white:   #ffffff;
  --radius:  14px;
  --shadow:  0 4px 24px rgba(0,0,0,.12);
  --font:    'Outfit', sans-serif;
  --mono:    'Space Mono', monospace;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: #f8fafc; color: var(--navy); }

/* ── NAV ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
  margin: 0; padding-bottom: 0;
}
.nav-inner {
  max-width: 1200px; margin: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px;
}
.nav-logo-img { height: 44px; width: 44px; object-fit: cover; border-radius: 50%; border: 2px solid var(--gold); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: #cbd5e1; text-decoration: none; font-weight: 500;
  padding: 7px 14px; border-radius: 8px; font-size: .9rem;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); background: rgba(245,158,11,.1); }
.btn-nav {
  background: var(--gold) !important; color: var(--navy) !important;
  border-radius: 8px !important; font-weight: 700 !important;
}
.btn-nav:hover { background: var(--gold-l) !important; }
.hamburger { display: none; background: none; border: 2px solid var(--gold); color: var(--gold); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 1.2rem; }
.mobile-menu { display: none; flex-direction: column; background: var(--navy2); padding: 12px 24px 16px; }
.mobile-menu a { color: #cbd5e1; padding: 10px 0; text-decoration: none; border-bottom: 1px solid #1e293b; font-size: .95rem; }
.mobile-menu.open { display: flex; }

@media(max-width:768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
}

/* ── HERO ── */
.hero { width: 100%; overflow: hidden; margin: 0; padding: 0; display: block; }
.hero-banner-wrap { position: relative; width: 100%; margin: 0; padding: 0; display: block; }
.hero-banner {
  width: 100%; display: block; margin: 0; padding: 0;
  height: 250px; object-fit: cover; object-position: center 55%;
}
.hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent 0%, rgba(15,23,42,.80) 100%);
  padding: 24px 40px 22px; line-height: 1.4 ; text-align: right;
}
.hero-tagline { color: #f1f5f9; font-size: 1rem; font-weight: 500; margin-bottom: 12px; text-shadow: 0 1px 6px rgba(0,0,0,.6);  text-align: right;}
.hero-cta {
  display: inline-block; background: var(--gold); color: var(--navy);
  padding: 11px 26px; border-radius: 50px; font-weight: 700;
  text-decoration: none; font-size: .95rem; transition: all .2s;
  box-shadow: 0 4px 16px rgba(245,158,11,.5);
}
.hero-cta:hover { background: var(--gold-l); transform: translateY(-2px); }

/* ── TOOLS SECTION ── */
.tools-section { max-width: 1200px; margin: 64px auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-tag {
  display: inline-block; background: var(--gold); color: var(--navy);
  font-size: .7rem; font-weight: 800; letter-spacing: .15em;
  padding: 4px 14px; border-radius: 50px; margin-bottom: 12px;
}
.section-header h2 { font-size: 2.2rem; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.section-header p { color: var(--slate); font-size: 1.05rem; max-width: 560px; margin: auto; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.tool-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--white); border-radius: var(--radius);
  padding: 24px 22px; text-decoration: none; color: inherit;
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  transition: all .25s; position: relative; overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--gold);
  transition: width .25s;
}
.tool-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 12px 40px rgba(0,0,0,.15); }
.tool-card:hover::before { width: 100%; opacity: .05; }
.tool-icon {
  font-size: 1.8rem; font-family: var(--mono);
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: var(--gold); border-radius: 12px;
  min-width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; border: 2px solid #fde68a;
  flex-shrink: 0;
}
.tool-info { flex: 1; }
.tool-info h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.tool-info p { font-size: .85rem; color: var(--muted); line-height: 1.5; }
.tool-arrow { font-size: 1.3rem; color: var(--gold); opacity: 0; transition: all .25s; }
.tool-card:hover .tool-arrow { opacity: 1; transform: translateX(4px); }

/* ── ABOUT STRIP ── */
.about-strip {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
  padding: 64px 24px;
}
.about-inner {
  max-width: 1100px; margin: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; flex-wrap: wrap;
}
.about-text { flex: 1; min-width: 280px; }
.about-text h2 { font-size: 2rem; font-weight: 800; color: var(--white); margin-bottom: 16px; }
.about-text h2 span { color: var(--gold); }
.about-text p { color: #94a3b8; line-height: 1.7; font-size: .97rem; margin-bottom: 12px; }
.about-sub { color: var(--gold-l) !important; font-size: .9rem !important; }
.about-stats { display: flex; gap: 32px; }
.stat { text-align: center; }
.stat span { display: block; font-size: 2.2rem; font-weight: 800; color: var(--gold); }
.stat label { color: #94a3b8; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }

/* ── FOOTER ── */
.footer { background: var(--navy); border-top: 3px solid var(--gold); padding: 32px 24px; text-align: center; }
.footer-logo { height: 44px; width: 44px; object-fit: cover; border-radius: 50%; border: 2px solid var(--gold); margin-bottom: 12px; }
.footer p { color: #64748b; font-size: .85rem; }
.footer-sub { color: var(--gold); margin-top: 4px; }

/* ── TOOL PAGES SHARED ── */
.tool-page { max-width: 1100px; margin: 40px auto; padding: 0 24px 60px; }
.tool-page-header { margin-bottom: 28px; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--blue-l); text-decoration: none; }
.tool-page-header h1 { font-size: 1.9rem; font-weight: 800; color: var(--navy); }
.tool-page-header p { color: var(--slate); font-size: .97rem; margin-top: 4px; }

.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.editor-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:700px) { .editor-row { grid-template-columns: 1fr; } }

textarea.code-area {
  width: 100%; min-height: 260px; font-family: var(--mono);
  font-size: .82rem; background: #0f172a; color: #e2e8f0;
  border: 2px solid #334155; border-radius: 10px;
  padding: 14px; resize: vertical; outline: none;
  line-height: 1.6; transition: border .2s;
}
textarea.code-area:focus { border-color: var(--gold); }

.output-area {
  width: 100%; min-height: 260px; font-family: var(--mono);
  font-size: .82rem; background: #0f172a; color: #86efac;
  border: 2px solid #1e293b; border-radius: 10px;
  padding: 14px; white-space: pre-wrap; word-break: break-all;
  overflow: auto; line-height: 1.6;
}

label.field-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); display: block; margin-bottom: 6px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.btn {
  padding: 10px 22px; border-radius: 8px; font-family: var(--font);
  font-size: .9rem; font-weight: 700; cursor: pointer;
  border: none; transition: all .2s;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-l); transform: translateY(-1px); }
.btn-secondary { background: var(--blue); color: #fff; }
.btn-secondary:hover { background: var(--blue-l); }
.btn-ghost { background: transparent; border: 2px solid #e2e8f0; color: var(--slate); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }

.status-bar {
  padding: 8px 14px; border-radius: 8px; font-size: .82rem;
  font-weight: 600; margin-top: 10px; display: none;
}
.status-bar.success { display: block; background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.status-bar.error   { display: block; background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.status-bar.info    { display: block; background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* diff colors */
.diff-added   { background: #dcfce7; color: #166534; }
.diff-removed { background: #fee2e2; color: #991b1b; }
.diff-changed { background: #fef9c3; color: #713f12; }

/* Image gen */
.img-output { text-align: center; padding: 20px; }
.img-output img { max-width: 100%; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.2); }
.prompt-input { width: 100%; padding: 14px 16px; border: 2px solid #e2e8f0; border-radius: 10px; font-family: var(--font); font-size: .95rem; outline: none; resize: vertical; min-height: 80px; }
.prompt-input:focus { border-color: var(--gold); }

select.field-select {
  padding: 10px 14px; border: 2px solid #e2e8f0; border-radius: 8px;
  font-family: var(--font); font-size: .9rem; outline: none; background: var(--white); color: var(--navy);
}
select.field-select:focus { border-color: var(--gold); }

/* spinner */
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid #fde68a; border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* API key notice */
.api-notice {
  background: #fffbeb; border: 2px solid var(--gold); border-radius: 10px;
  padding: 14px 18px; font-size: .85rem; color: #92400e; margin-bottom: 20px;
}
.api-notice a { color: var(--blue); }

/* settings page */
.settings-form input {
  width: 100%; padding: 12px 14px; border: 2px solid #e2e8f0; border-radius: 8px;
  font-family: var(--font); font-size: .95rem; outline: none; margin-top: 6px;
}
.settings-form input:focus { border-color: var(--gold); }

/* responsive tweaks */
@media(max-width:480px) {
  .hero-overlay { padding: 20px 16px 16px; }
  .hero-tagline { font-size: .9rem; }
  .section-header h2 { font-size: 1.6rem; }
  .about-stats { gap: 16px; }
}
