/* Unified button styling for Upload, Generate, etc. */
.glow-btn {
  background: linear-gradient(90deg, #00ffff 0%, #0077ff 100%);
  border: none;
  border-radius: 6px;
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 6px rgba(0,255,255,0.3);
}

.glow-btn:hover {
  box-shadow: 0 0 16px rgba(0,255,255,0.6);
  transform: translateY(-1px);
}

.glow-btn.secondary {
  background: linear-gradient(90deg, #555 0%, #333 100%);
}

.glow-btn.tertiary {
  background: transparent;
  border: 1px solid rgba(0,255,255,0.4);
  color: #00ffff;
  animation:  2.5s ease-in-out infinite;
}
/* ==========================================
   AetherFab v10 rebuild verified 2d working – Visual Theme (LOCKED)
   File: style 
   Build: 2025-09-05
   Notes:
   - Do not modify visuals without explicit approval
   - Starfield / gradients / glass panels unchanged
========================================== */

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

body {
  font-family: 'Orbitron', sans-serif;
  background: #0b0615;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Cinematic Background === */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(-45deg, #0b0615, #120b3f, #0ad4ff, #8b5cf6);
  background-size: 400% 400%;
  animation: gradientMove 25s ease infinite;
  z-index: -3;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Vignette Overlay */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(0,0,0,0) 60%, rgba(0,0,0,0.55) 100%);
  z-index: -2;
  pointer-events: none;
}

/* === Particle Canvas === */
#particle-canvas {
  background: transparent;      /* no default color */
  pointer-events: none;         /* let clicks pass through */
  position: fixed;              /* cover entire viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* === Glowing Header === */
.glass-header {
  width: 100%;
  height: 120px;
  background: rgba(15, 15, 30, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0; left: 0;
  z-index: 10;
}

.logo-container { text-align: center; }
.aetherfab-logo text:first-of-type { animation: logoPulse 4s ease-in-out infinite; }

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 6px #00f0ff) drop-shadow(0 0 12px #a040ff); }
  50%      { filter: drop-shadow(0 0 14px #00f0ff) drop-shadow(0 0 28px #a040ff); }
}

/* === Layout Grid === */
.app-content {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  width: 95%;
  max-width: 1600px;
  margin: 160px auto 40px auto;
}

/* === Panels === */
.glass-panel {
  background: rgba(20, 20, 40, 0.7);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  padding: 20px;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.08);
  transition: 0.3s ease;
}
.glass-panel:hover { box-shadow: 0 0 40px rgba(0, 255, 255, 0.2); }

/* === Prompt Column === */
textarea {
  width: 100%;
  min-height: 80px;
  margin: 10px 0;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  padding: 8px;
  resize: none;
}

/* === Preview Column === */
.preview-container {
  background: transparent;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 255, 0.15);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6ee6ff;
  font-size: 0.9rem;
  margin-bottom: 15px;
  overflow: hidden;
  position: relative;
  transition: background 0.3s ease;
}
.preview-container.white-bg { background: #fff; }

.preview-container img.concept-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
  background: transparent;
}
.preview-container canvas {
  display: none;
  width: 100%;
  height: 100%;
}

/* === Buttons === */
.primary-btn {
  background: linear-gradient(90deg, #00f0ff, #a040ff);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
  margin: 8px 4px;
}
.primary-btn:hover { box-shadow: 0 0 12px #00f0ff; }

.secondary-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 255, 0.3);
  color: #6ee6ff;
  padding: 8px 14px;
  margin: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}
.secondary-btn:hover { background: rgba(0, 255, 255, 0.2); }

/* 🔧 Disabled Button */
.disabled-btn { opacity: 0.4; pointer-events: none; }

/* Button Row */
.button-row { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* === Viewer Toolbar Styles === */
.viewer-toolbar {
  display:flex; flex-wrap:wrap; gap:.5rem;
  align-items:center; justify-content:space-between;
  background:#0e1726; border:1px solid #1e293b;
  border-radius:12px; padding:.5rem .6rem; margin:.6rem 0;
}
.viewer-toolbar__group { display:flex; gap:.4rem; }
.vtb {
  background:#121a2b; color:#e5e7eb; border:1px solid #2b3451;
  padding:.45rem .7rem; border-radius:10px; cursor:pointer;
  font:500 0.9rem/1 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  transition:transform .05s ease, background .15s ease, border-color .15s ease;
}
.vtb:hover { background:#0f1424; border-color:#3a4a78; }
.vtb:active { transform:translateY(1px); }

/* === Workflow === */
.column-right ol { padding-left: 18px; margin-bottom: 12px; }
.column-right li { margin-bottom: 6px; }
.column-right h4 { margin-top: 10px; color: #00f0ff; }

/* === Gallery === */
.fabrications-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.fabrications-gallery img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.fabrications-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
}

/* === Animations === */
.fade-in-left { animation: fadeInLeft 1s ease forwards; }
.fade-in-up   { animation: fadeInUp 1s ease forwards; }
.fade-in-right{ animation: fadeInRight 1s ease forwards; }

@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInUp   { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInRight{ from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }


/* === Viewer polish (safe additions) === */

/* Give the 3D canvas more breathing room */
.preview-container {
  height: 520px; /* was 400px; bump as needed */
}

/* Ensure the <canvas> fills the box cleanly */
#three-canvas {
  display: block;   /* remove inline-gap */
  width: 100%;
  height: 100%;
}

/* Space the toolbar under the canvas when it's inside the center panel */
.glass-panel.column-center .viewer-toolbar {
  margin-top: 10px;
}

/* Optional: make active/selected toolbar buttons visually distinct */
.vtb.is-active {
  border-color: #00f0ff;
  box-shadow: 0 0 10px rgba(0,240,255,0.35);
  background: #0f1424;
  color: #e8fbff;
}

/* Optional: responsive bump for larger screens */
@media (min-width: 1400px) {
  .preview-container { height: 620px; }
}


/* ✅ v10.x ADDITION: Projects panel styling — 2025-09-08 */
.af-panel{
  background: rgba(7, 14, 25, 0.78);
  border: 1px solid #1b2f49;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

#projectsSection{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: auto;   /* let content control height */
  overflow: visible;  /* prevent forced scrollbars */
}

#projectsSection h3,
#projectsSection h2 {
  font-size: 1.5rem;   /* bump size */
  font-weight: 700;    /* make it bolder */
  margin-bottom: 12px; /* add a little breathing room */
}


/* Optional: cards look a bit nicer inside the darker panel */
#fabricationsGallery .af-card{
  background: #0b1220;
  border-color: #203554;
}

/* Projects card panel */
#afProjectBar button {
  flex-shrink: 0;
}

#fabricationsGallery {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#fabricationsGallery .af-card {
  background: #0b1220;
  border: 1px solid #203554;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #d9f9ff;
  cursor: pointer;
  transition: background 0.2s ease;
}

#fabricationsGallery .af-card:hover {
  background: rgba(0, 240, 255, 0.08);
}

#fabricationsGallery .af-card img {
  height: 40px;
  width: auto;
  margin-right: 8px;
  border-radius: 4px;
}


/* ===== Landing Page Styling =====
   These rules apply ONLY when <body class="landing"> is used
   so they won't touch the builder (app.html) visuals.
============================================================= */
/* ===== Landing Page FINAL ===== */
body.landing {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: 'Orbitron', sans-serif;
  color: #fff;

  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

body.landing #particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

body.landing .landing-wrapper {
  z-index: 1;
  max-width: 900px;
  padding: 3rem 2rem;
}

/* ===== AetherFab Landing Page ===== */
body.landing {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  background: transparent; /* starfield shows through */

  display: flex;
  flex-direction: column;   /* hero, features, footer stacked */
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

body.landing #particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* glass hero panel */
.landing-hero {
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  width: 100%;
}

.hero-content {
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 3rem 4rem;
  max-width: 700px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.hero-content h1.brand {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #00eaff; /* neon cyan */
}

.hero-content .tagline {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.btn {
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn.primary {
  background: #00eaff;
  color: #000;
}
.btn.primary:hover {
  background: #5ffaff;
}

.btn.secondary {
  background: transparent;
  border: 2px solid #00eaff;
  color: #00eaff;
}
.btn.secondary:hover {
  background: rgba(0,234,255,0.15);
}

/* features + footer */
.features {
  z-index: 1;
  margin: 4rem 0 2rem;
  max-width: 800px;
}
.features h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: #5ffaff;
}
.features ul {
  list-style: none;
  padding: 0;
}
.features li {
  margin: 0.5rem 0;
  font-size: 1.2rem;
}

footer {
  z-index: 1;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}
footer a { color: #5ffaff; }
footer a:hover { text-decoration: underline; }

/* --- Landing Page: Typography & Contrast --- */
.hero-content h1.brand {
  color: #00eaff;
  text-shadow:
    0 0 10px rgba(0,234,255,0.8),
    0 0 20px rgba(0,234,255,0.4);
}
body.landing {
  color: #eaeaea; /* softer body text for contrast */
}

/* --- Landing Page: Hero Card Depth --- */
.hero-content {
  background: rgba(10,10,25,0.65);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.auth-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10,10,25,0.85);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  padding: 2rem;
  z-index: 2000;
}
.auth-card.hidden { display: none; }

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Supabase Auth Modal ===== */
.auth-modal.hidden { display: none; }

.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
}

.auth-inner {
  background: rgba(20,25,35,0.95);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0,0,0,0.4);
  max-width: 400px;
  width: 90%;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}
.close-btn:hover { color: #0ff; }

#auth-card {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#auth-card .auth-inner {
  background: #111827;
  padding: 2rem;
  border-radius: 1rem;
  width: 400px;
  max-width: 90%;
  color: #fff;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

#auth-card.hidden { display: none; }

#close-auth {
  position: absolute;
  top: 10px; right: 10px;
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ===== Auth Modal ===== */
#auth-card {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#auth-card.hidden { display: none; }

#auth-card .auth-inner {
  background: rgba(17, 24, 39, 0.95); /* dark glass */
  padding: 2rem;
  border-radius: 1rem;
  width: 420px;
  max-width: 90%;
  color: #fff;
  text-align: center;
  position: relative;

  /* glowing border to match landing */
  border: 1px solid rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.3),
              0 0 60px rgba(138, 43, 226, 0.2);
}

#auth-card .auth-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #00eaff;
  text-shadow: 0 0 12px rgba(0, 234, 255, 0.7);
}

#close-auth {
  position: absolute;
  top: 12px; right: 12px;
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
#close-auth:hover { color: #fff; }


/* ===== Modal Animation ===== */
#auth-card {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#auth-card.show {
  opacity: 1;
  pointer-events: auto;
}

#auth-card .auth-inner {
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

#auth-card.show .auth-inner {
  transform: scale(1);
  opacity: 1;
}

/* Auth Modal Styling */
.auth-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-modal-content {
  background: #111;
  padding: 2rem;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  color: white;
  box-shadow: 0 0 30px rgba(0,255,255,0.4);
}

.auth-modal.hidden {
  display: none;
}

.close-btn {
  float: right;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  color: #aaa;
  cursor: pointer;
}
.close-btn:hover {
  color: #fff;
}

/* ================================
   AUTH MODAL STYLES
   ================================ */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.auth-modal.hidden {
  display: none;
}

.auth-inner {
  background: #1c1c1c;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: fadeInScale 0.3s ease forwards;
}

.auth-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.auth-inner input {
  width: 100%;
  padding: 12px 14px;
  margin: 0.5rem 0;
  border: 1px solid #333;
  border-radius: 6px;
  background: #2a2a2a;
  color: #fff;
  font-size: 1rem;
}

.auth-inner input:focus {
  outline: none;
  border-color: #00e5ff;
  box-shadow: 0 0 6px #00e5ff55;
}

.auth-inner .btn {
  width: 100%;
  margin-top: 1rem;
  background: linear-gradient(90deg, #00e5ff, #009ec3);
  color: #000;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-inner .btn:hover {
  background: linear-gradient(90deg, #009ec3, #00e5ff);
  transform: translateY(-2px);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.close-btn:hover {
  color: #00e5ff;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===========================
   AUTH MODAL STYLING
   =========================== */
#auth-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  background: rgba(20, 20, 40, 0.95);
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.4);
  padding: 30px;
  text-align: center;
  z-index: 9999;
  display: none; /* hidden by default */
}

#auth-card h2 {
  color: #00e5ff;
  font-family: "Orbitron", sans-serif;
  margin-bottom: 20px;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.8);
}

#auth-card input {
  width: 85%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid rgba(0,229,255,0.5);
  border-radius: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

#auth-card input:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0,229,255,0.8);
}

#auth-card button {
  width: 90%;
  padding: 12px;
  margin-top: 15px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #00e5ff, #009ec3);
  color: #000;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#auth-card button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(0,229,255,0.9);
}

#close-auth {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s ease;
}

#close-auth:hover {
  color: #fff;
}

/* Show modal when toggled */
#auth-card.show {
  display: block;
}
/* Modal wrapper (overlay) */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
   
   /* Hidden state */
   .hidden {
     display: none !important;
   }

/* Inner card */
.auth-inner {
  background: #111;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  text-align: center;
}

.auth-inner h2 {
  margin-bottom: 1rem;
  color: #00e5ff;
}

.auth-inner input {
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.75rem;
  border: 1px solid #333;
  border-radius: 4px;
  background: #222;
  color: #fff;
}

.auth-inner button {
  background: #00e5ff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  margin-top: 1rem;
  cursor: pointer;
  font-weight: bold;
}

/* ===== Auth modal visibility & layout ===== */
.auth-modal {
  position: fixed;
  inset: 0;                 /* top:0; right:0; bottom:0; left:0 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;           /* above hero/starfield */
}

.auth-modal.hidden {
  display: none;
}

.auth-inner {
  width: min(92vw, 380px);
  background: #111;
  color: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 229, 255, 0.35);
  position: relative;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: #00e5ff;
  font-size: 24px;
  cursor: pointer;
}

#supabase-auth input {
  width: 100%;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #223;
  background: #0b0f14;
  color: #e6f9ff;
}

#supabase-auth button[type="submit"] {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: #00e5ff;
  color: #001218;
  font-weight: 700;
  cursor: pointer;
}


#auth-card {
  max-width: 400px;
  max-height: 420px;   /* keeps it from being too tall */
  margin: auto;
  padding: 20px 20px 30px 20px;
  border-radius: 12px;
}

#close-auth {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;   /* ✅ padding so it doesn’t sit flush */
}

/* Center the modal itself */
#auth-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* ✅ centers perfectly */
  max-width: 400px;
  max-height: 450px;
  width: 90%;
  background: rgba(10, 10, 20, 0.95);
  border-radius: 12px;
  padding: 40px 20px 30px 20px;  /* ✅ extra top padding for breathing room */
  box-shadow: 0px 8px 40px rgba(0, 255, 255, 0.4);
  text-align: center;            /* ✅ centers inner content */
  z-index: 9999;                 /* make sure it sits above background */
}

/* Style the close button better */
#close-auth {
  position: absolute;
  top: 12px;     /* ✅ add more spacing */
  right: 16px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
  background: none;
  border: none;
  padding: 4px 8px; /* ✅ keeps it click-friendly */
}

/* Inputs look consistent */
#supabase-auth input {
  display: block;
  margin: 10px auto;
  padding: 10px;
  width: 90%;
  border-radius: 6px;
  border: 1px solid #333;
  background: #111;
  color: #fff;
}

#supabase-auth button {
  margin-top: 15px;
  width: 95%;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: #00e5ff;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}

#supabase-auth button:hover {
  background: #00c0d9;
}

/* Modal base (hidden by default) */
#auth-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  pointer-events: none;  /* don’t block clicks when hidden */
  transition: all 0.3s ease-in-out;  /* ✅ smooth fade + scale */
  max-width: 400px;
  max-height: 450px;
  width: 90%;
  background: rgba(10, 10, 20, 0.95);
  border-radius: 12px;
  padding: 40px 20px 30px 20px;
  box-shadow: 0px 8px 40px rgba(0, 255, 255, 0.4);
  text-align: center;
  z-index: 9999;
}

/* When modal is shown */
#auth-card.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1); /* ✅ slight pop */
}

/* Close button */
#close-auth {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
  background: none;
  border: none;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

#close-auth:hover {
  color: #00e5ff;
}
/* === AUTH MODAL FINAL === */
#auth-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease-in-out;
  max-width: 400px;
  width: 90%;
  background: rgba(10, 10, 20, 0.95);
  border-radius: 12px;
  padding: 60px 20px 30px 20px;  /* ⬆ more top padding */
  box-shadow: 0px 8px 40px rgba(0, 255, 255, 0.4);
  text-align: center;
  z-index: 9999;
}

#auth-card.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Close button */
#close-auth {
  position: absolute;
  top: 16px;      /* ⬆ extra breathing room */
  right: 16px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
  background: none;
  border: none;
  padding: 6px 10px;   /* ✅ more tappable */
  transition: color 0.2s ease;
}
#close-auth:hover {
  color: #00e5ff;
}
/* =======================================================
   ✅ Auth Modal FIXED – No Close Button, Centered
   ======================================================= */
#auth-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease-in-out;
  max-width: 400px;
  width: 90%;
  background: rgba(10, 10, 20, 0.95);
  border-radius: 12px;
  padding: 60px 20px 30px 20px; /* ample top padding */
  box-shadow: 0px 8px 40px rgba(0, 255, 255, 0.4);
  text-align: center;
  z-index: 9999;
}

#auth-card.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Inputs */
#supabase-auth input {
  display: block;
  margin: 10px auto;
  padding: 10px;
  width: 90%;
  border-radius: 6px;
  border: 1px solid #333;
  background: #111;
  color: #fff;
}

#supabase-auth button {
  margin-top: 15px;
  width: 95%;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: #00e5ff;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}
#supabase-auth button:hover {
  background: #00c0d9;
}

/* =========================
   Header Styling
========================= */
.header-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: #00e0ff;
}

.header-bar #welcomeMessage {
  margin-right: 12px;
}

.logout-btn {
  background: transparent;
  color: #ff4081;
  border: 1px solid #ff4081;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: #ff4081;
  color: #fff;
}

/* === Refined Auth Header Bar (two floating pods) === */
.auth-header-bar {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 80px; /* pushes content inward toward center */
  z-index: 10;
}

.auth-left, .auth-right {
  background: rgba(0, 30, 40, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 10px;
  padding: 6px 14px;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.15);
}

.auth-left {
  color: #c8f8ff;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

.auth-right button {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.4);
  color: #0ff;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.15);
}

.auth-right button:hover {
  background: rgba(0, 255, 255, 0.25);
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.35);
}

/* === Interactive Pulse for Welcome Container === */
.auth-left {
  position: relative;
  color: #c8f8ff;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

.auth-left::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: scale(0.9);
  z-index: -1;
}

.auth-left:hover::before {
  opacity: 1;
  transform: scale(1.05);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1.05);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.15);
  }
}

/* === Tooltip for Welcome (Profile hint) === */
.auth-left {
  position: relative;
  cursor: pointer;
}

.auth-left::after {
  content: "Profile options coming soon";
  position: absolute;
  bottom: -34px;
  left: 0;
  background: rgba(0, 25, 35, 0.85);
  color: #aefbff;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  border: 1px solid rgba(0, 255, 255, 0.25);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(5px);
  z-index: 10;
}

.auth-left:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* === Floating Tooltip Animation for Welcome Message === */
@keyframes floatTooltip {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.auth-left:hover::after {
  opacity: 1;
  transform: translateY(0);
  animation: floatTooltip 2.8s ease-in-out infinite;
}

#afSaveProjectBtn {
  border-color: #33ffee;
  color: #bafaff;
  transition: all 0.25s ease-in-out;
}

#afSaveProjectBtn:hover {
  background: rgba(0, 255, 255, 0.12);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

/* Unified button styling for Upload, Generate, etc. */
.glow-btn {
  background: linear-gradient(90deg, #00ffff 0%, #0077ff 100%);
  border: none;
  border-radius: 6px;
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 6px rgba(0,255,255,0.3);
}

.glow-btn:hover {
  box-shadow: 0 0 16px rgba(0,255,255,0.6);
  transform: translateY(-1px);
}

.glow-btn.secondary {
  background: linear-gradient(90deg, #555 0%, #333 100%);
}

.glow-btn.tertiary {
  background: transparent;
  border: 1px solid rgba(0,255,255,0.4);
  color: #00ffff;
  animation:  2.5s ease-in-out infinite;
}

/* === Unified Button Look (AetherFab Pulse v10.2) === */
.glow-btn {
  background: linear-gradient(90deg, #00ffff 0%, #8000ff 100%);
  border: none;
  border-radius: 6px;
  color: #fff;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.35);
}

/* Gradient reversal on hover */
.glow-btn:hover {
  background: linear-gradient(90deg, #8000ff 0%, #00ffff 100%);
  box-shadow: 0 0 18px rgba(128, 0, 255, 0.6);
  transform: translateY(-1px);
}

/* Primary – Upload & Generate */
.glow-btn.primary {
  background: linear-gradient(90deg, #00ffff 0%, #8000ff 100%);
  animation: softPulse 3s ease-in-out infinite;
}

/* Secondary – Make 3D */
.glow-btn.secondary {
  background: linear-gradient(90deg, #444 0%, #222 100%);
  color: #ccc;
}

/* Soft breathing pulse for active buttons */
@keyframes softPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(0,255,255,0.3);
  }
  50% {
    box-shadow: 0 0 18px rgba(128,0,255,0.5);
  }
}
