/* styles.css */ /* ==================================================
   MFS Utilities — Unified Stylesheet
   Path: /assets/css/styles.css
   Features: theme-aware, absolute asset paths, responsive
   ================================================== */

/* --------------------------------------------------
   Root Variables
-------------------------------------------------- */
:root {
  --bg-dark: #000000;
  --bg-light: #f7f7f7;

  --text-dark: #e6e6e6;
  --text-light: #111111;

  --accent: #00aaff;
  --accent-glow: 0 0 12px rgba(0, 170, 255, 0.75);

  --panel-dark: #0d0d0d;
  --panel-light: #ffffff;

  --border: rgba(0, 170, 255, 0.18);
  --radius: 10px;

  --muted: rgba(230, 230, 230, 0.6);
  --transition: 250ms ease;
  --max-width: 1100px;
}

/* Theme tokens */
[data-theme="dark"] {
  --bg: var(--bg-dark);
  --text: var(--text-dark);
  --panel: var(--panel-dark);
  --textarea-bg: #111111;
  --tab-active-bg: #0b0b0b;
  --tab-inactive-color: #888888;
}

[data-theme="light"] {
  --bg: var(--bg-light);
  --text: var(--text-light);
  --panel: var(--panel-light);
  --textarea-bg: #ffffff;
  --tab-active-bg: #f2f8fb;
  --tab-inactive-color: #666666;
  --muted: #555555;
}

/* --------------------------------------------------
   Global
-------------------------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
  line-height: 1.45;
}

/* Utility */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Layout containers */
.header, .footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.converter {
  max-width: var(--max-width);
  margin: 36px auto;
  padding: 24px;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--accent-glow);
}

/* Neon panel */
.neon-panel {
  border: 1px solid var(--border);
  box-shadow: var(--accent-glow);
}

/* --------------------------------------------------
   Header
-------------------------------------------------- */
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  height: 48px;
  width: auto;
  display: block;
  transition: filter var(--transition), transform var(--transition);
}

.title-group p {
   font-size: 1.6rem;     /* adjust to taste */
  font-weight: 700;      /* bold like a heading */
  margin: 0;             /* keeps layout tight */
  line-height: 1.2;
}

.title-group .tagline {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
  color: var(--muted);
}

/* --------------------------------------------------
   Theme Toggle
-------------------------------------------------- */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch {
  position: relative;
  width: 48px;
  height: 24px;
  display: inline-block;
}

.switch input { display: none; }

.slider {
  position: absolute;
  inset: 0;
  background: #444;
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition);
}

.slider:before {
  content: "";
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}

.switch input:checked + .slider {
  background: var(--accent);
  box-shadow: var(--accent-glow);
}

.switch input:checked + .slider:before {
  transform: translateX(24px);
}

.mode-label {
  font-size: 0.9rem;
  color: var(--muted);
}

/* --------------------------------------------------
   Tool Cards & SEO content
-------------------------------------------------- */
.tool-list { display: grid; gap: 12px; }

.tool-card {
  padding: 14px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
}

.tool-card h3 { margin: 0 0 6px 0; font-size: 1rem; }
.tool-card p { margin: 0; color: var(--muted); }
 
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

/* Homepage portal */
.portal-title {
  text-align: center;
  margin-bottom: 10px;
  color: #fff;
}

.portal-subtitle {
  text-align: center;
  color: #888;
  font-size: 14px;
  margin-bottom: 30px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.portal-card {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 25px;
  border-radius: 6px;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
}

.portal-card-title {
  color: #00bcff;
  margin-top: 0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-card-text {
  color: var(--text); /* Changes seamlessly based on active theme */
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.portal-card:hover {
  border-color: #00bcff;
  transform: translateY(-2px);
}

.coming-soon {
  position: relative;
  opacity: 0.7;
}

.coming-soon-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #0ff;
  color: #000;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* SEO / info wrapper */
.layout-wrapper {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  line-height: 1.6;
  color: #ccc;
}

.seo-content {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  line-height: 1.6;
}

.seo-divider {
  border: 0;
  border-top: 1px solid #222;
  margin-bottom: 40px;
}

/* --------------------------------------------------
   Upload / Drop zone
-------------------------------------------------- */
.upload-box, .drop-zone {
  border: 2px dashed var(--accent);
  padding: 36px;
  text-align: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  background: transparent;
}

.upload-box:focus, .drop-zone:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 170, 255, 0.08);
}

.upload-box.dragover, .drop-zone.dragover,
.upload-box.is-dragover, .drop-zone.is-dragover {
  background: rgba(0, 170, 255, 0.06);
  border-color: var(--accent);
}

.drop-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.muted { color: var(--muted); font-size: 0.9rem; }

/* --------------------------------------------------
   Tabs & Input Panels
-------------------------------------------------- */
.input-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tab {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--tab-inactive-color);
  transition: var(--transition);
}

.tab[aria-selected="true"], .tab.active {
  background: var(--tab-active-bg);
  color: var(--text);
  border-color: rgba(0, 188, 255, 0.12);
  box-shadow: var(--accent-glow);
}

.input-panel {
  margin-top: 12px;
  display: block;
}

textarea {
  width: 100%;
  min-height: 160px;
  padding: 14px;
  background: var(--textarea-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

textarea[readonly] { opacity: 0.95; }
.output-group { margin-top: 12px; }

.preview-container {
  margin-top: 12px;
  display: block;
  border-radius: var(--radius);
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
}

.preview-container img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Reverse section */
.reverse-section {
  margin-top: 40px;
}

/* --------------------------------------------------
   Buttons
-------------------------------------------------- */
.button-group, .action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Base button styles for all regular buttons (Preview, Copy, etc.) */
button {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent); /* unified text color */
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
}

/* Primary variant (Preview button) */
button.primary {
  background: var(--accent);
  color: #000;
  box-shadow: var(--accent-glow);
  border-color: transparent;
}

/* Hover / active for all regular buttons */
button:hover {
  transform: translateY(-1px);
  box-shadow: var(--accent-glow);
}

button:active {
  transform: translateY(0);
}

/* Back/Next container (POSITIONING – unchanged) */
.back-button-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.back-button-wrapper {
  display: flex;
  justify-content: space-between; /* Back left, Next right */
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

/* Back button (anchor or button) */
.back-button {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent); /* same text color as other buttons */
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

/* Next Tool button (mirror Back button behavior) */
.next-button {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent); /* same text color as other buttons */
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

/* Hover / focus / active for Back + Next (same as other buttons) */
.back-button:hover,
.back-button:focus,
.next-button:hover,
.next-button:focus {
  transform: translateY(-1px);
  box-shadow: var(--accent-glow);
  text-decoration: none;
  color: var(--accent);
}

.back-button:active,
.next-button:active {
  transform: translateY(0);
  color: var(--accent);
}

.back-button[role="button"]:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 170, 255, 0.12);
}

/* --------------------------------------------------
   Footer
-------------------------------------------------- */
.footer {
  text-align: center;
  padding: 28px 20px;
  opacity: 0.85;
  font-size: 0.95rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

/* --------------------------------------------------
   Global Elements Settings
-------------------------------------------------- */
a:focus, button:focus, input:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 170, 255, 0.08);
}

h1, h2, h3 { margin: 0 0 10px 0; }
p { margin: 0 0 12px 0; }

h1 {
  font-size: 1.6rem;   /* or 1.4rem if you want it smaller */
  font-weight: 600;    /* optional: adjust weight */
  margin-bottom: 1rem; /* optional: spacing */
}

h1 {
  text-align: center;
}

.hidden { display: none !important; }

/* --------------------------------------------------
   Global Mobile Responsiveness Pass
-------------------------------------------------- */
@media (max-width: 640px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
  }

  .header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-left img {
    height: 40px;
  }

  .theme-toggle {
    align-self: flex-end;
  }

  .converter, 
  .converter.neon-panel {
    padding: 15px !important;
    margin: 10px !important;
  }

  .seo-content {
    padding: 15px !important;
    margin: 20px auto !important;
  }

  textarea {
    font-size: 1rem;
    min-height: 200px;
  }

  button {
    min-height: 44px;
  }

  .button-group, 
  .action-buttons {
    flex-direction: column;
    margin: 15px 0 !important;
    width: 100%;
  }

  .button-group button,
  .action-buttons button,
  .back-button-wrapper button {
    width: 100%;
  }

  .back-button-container {
    max-width: 100%;
    padding: 0 10px;
  }

  .back-button-wrapper {
    width: 100%;
    justify-content: center;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
  }
}

/* --------------------------------------------------
   AdSense Intentional Layout Placements 
-------------------------------------------------- */

/* 1. The Top Ad: Large, flexible placeholder for premium bids */
.top-ad-placement {
  display: block;
  width: 100%;
  min-height: 250px;       /* Roomy canvas for media or text grids */
  margin: 2.5rem auto;     /* Generous space to keep content separate */
  text-align: center;
}

/* 2. The Bottom Ad: Flat, horizontal ribbon anchor above legal links */
.bottom-ad-placement {
  display: block;
  width: 100%;
  max-width: 728px;        /* Matches standard leaderboard proportions */
  max-height: 90px;        /* Locks layout to protect legal link visibility */
  margin: 4rem auto 1.5rem auto; /* Large top split, clean transition to footer */
  text-align: center;
}

/* Muted, theme-aware text rules for the 'SPONSORED CONTENT' disclaimer text */
.top-ad-placement span, 
.bottom-ad-placement span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);     /* Uses existing variable to gracefully support light & dark modes */
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 0.6rem;
}