/* Base layout */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(to right, #4b0082, #b22222, #ff8c00); /* Indigo → Red → Orange */
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  color: #fdfdfd;
}





/* Header */
header {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.8rem;
  margin: 0;
  letter-spacing: 1px;
}

/* Navigation */
nav a {
  color: #ffcc70;
  margin-left: 1.5rem;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}
nav a:hover {
  color: #ffffff;
}

/* Forms */
.form-container {
  max-width: 420px;
  margin: 3rem auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  backdrop-filter: blur(6px);
}

label {
  display: block;
  margin-top: 1.2rem;
  font-weight: 600;
  color: #ffd9b3;
}

input[type="email"],
input[type="password"],
input[type="file"] {
  width: 80%;
  padding: 0.6rem;
  margin-top: 0.4rem;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  background: #fefefe;
  color: #222;
}

button {
  margin-top: 1.5rem;
  padding: 0.75rem;
  width: 80%;
  border: none;
  font-weight: bold;
  font-size: 1rem;
  background: linear-gradient(90deg, #b22222, #ff8c00);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}
button:hover {
  background: linear-gradient(90deg, #ff8c00, #b22222);
}



/* Dashboard */
main.dashboard {
  display: flex;              /* ← ADD THIS */
  flex-direction: row;        /* ← ADD THIS */
  gap: 1rem;
  max-width: 980px;
  margin: 2rem auto;
  padding: 2rem;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 0 16px rgba(0,0,0,0.25);
}

.file-list {
  margin-top: 2rem;
}
.file-list ul {
  list-style-type: none;
  padding: 0;
}
.file-list li {
  margin: 0.5rem 0;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fffbe6;
}

.file-list a {
  color: #ffb366;
  font-weight: bold;
  text-decoration: none;
}
.file-list a:hover {
  color: #ffffff;
}

/* Animations */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Base Responsive Grid */

main {
  flex: 1;
  padding: 2rem;
  box-sizing: border-box;
}

/* Responsive Form & Container */
.form-container,
main.dashboard {
  margin: 2rem auto;
  padding: 2rem;
  width: 90%;
  max-width: 960px;
  box-sizing: border-box;
}

/* Responsive Typography */
h1, h2, h3 {
  word-break: break-word;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  nav {
    margin-top: 1rem;
  }
  nav a {
    display: block;
    margin: 0.5rem 0;
  }
}

/* Responsive File List */
@media (max-width: 600px) {
  .file-list li {
    flex-direction: column;
    align-items: flex-start;
  }
  .file-list a {
    margin-top: 0.5rem;
  }
}

.synapse-graphic {
  position: absolute;
  right: 2%;
  top: 20%;
  width: 300px;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .synapse-graphic {
    display: none;
  }
}

.form-note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #ffcfa3;
}

input:invalid {
  border: 2px solid #ff8888;
}

input:valid {
  border: 1px solid #80d080;
}

input[type="password"] {
  font-family: monospace;
}

.password-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 0.4rem;
}

.password-wrapper input {
  width: 80%;
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fefefe;
  color: #222;
  font-family: monospace;
}

.toggle-password {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  background: none;
  border: none;
  color: #ffdba0;
  cursor: pointer;
  align-self: flex-start;
}

.toggle-password:hover {
  color: white;
  text-decoration: underline;
}


.file-heading {
  color: #000;
  margin-bottom: 0.5rem;
}

.file-preview {
  white-space: pre-wrap;
  background-color: #fff;
  color: #000;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: Consolas, monospace;
  margin-top: 0.5rem;
  overflow: auto;
  height: 60vh;          /* ✅ Fixed height */
  max-height: 80vh;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
  font-size: 0.95rem;
  line-height: 1.4;
  width: 100%;
  resize: none;          /* ✅ Disable resize */
}






.file-placeholder {
  color: #ffcfa3;
  font-style: italic;
  margin-top: 1rem;
}

#backToTop {
  position: fixed;
  bottom: 60px;
  left: 190px;
  z-index: 99;
  font-size: 18px;
  background-color: #e85d04;
  color: white;
  border: none;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: none;
  width: 32px;
  height: 32px;

  /* Center content with Flexbox */
  display: flex;
  justify-content: center;
  align-items: center;
}


#backToTop:hover {
  background-color: #ff6f00;
}

.session-view-button {
  margin-top: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: bold;
  background: linear-gradient(90deg, #32cd32, #7fff00); /* LimeGreen → Chartreuse */
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.session-view-button:hover {
  background: linear-gradient(90deg, #7fff00, #32cd32);
  transform: translateY(-1px);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.header-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.copy-link-button {
  display: inline-block;  /* Let it sit neatly beside links/buttons */
  margin-left: 0.5rem;
  background-color: #2196f3;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  color: white;
  border: none;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  width: 110px;
  text-align: left;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  background-image: none; /* override global gradient */
}



.copy-link-button:hover {
  background-color: #0b7dda;
}

.custom-file-label {
  display: inline-block;
  background-color: #2196f3;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.custom-file-label:hover {
  background-color: #0b7dda;
}


.copy-link-button {
  font-size: 0.85rem;
  padding: 0.5rem 0.7rem;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editor-controls button {
  font-size: 0.85rem;
  padding: 4px 6px;
}

.left-panel {
  width: 30%;
  flex-shrink: 0;
  max-width: 250px;
}

.right-panel {
  width: 65%;
  overflow: auto;
}


@media (max-width: 768px) {
  main.dashboard {
    flex-direction: column;
  }
}

.save-button {
  background-color: #66cc99;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  width: 100px;
}

.save-button:hover {
  background-color: #55aa88;
}

/* ===== Fixed Bottom Bar for Email + Stripe ===== */
.bottom-bar {
  position: fixed;
  bottom: 20px;           /* Buffer from bottom */
  left: 30px;             /* Buffer from left margin */
  display: flex;
  align-items: center;
  gap: 8px;               /* Space between elements */
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 10px;
  border-radius: 6px;
  z-index: 100;
}

/* Email Input (compact & professional) */
.bottom-bar input[type="email"].email-input {
  width: 160px;           /* Reasonable width */
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.95);
  color: #222;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

.bottom-bar input[type="email"].email-input:focus {
  outline: none;
  border-color: #ffcc70;
  box-shadow: 0 0 0 1px rgba(255, 204, 112, 0.4);
}

/* Stripe Button (small) */
.bottom-bar .stripe-button {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  background: linear-gradient(90deg, #635bff, #00d4ff);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: background 0.2s ease, transform 0.1s ease;
}

.bottom-bar .stripe-button:hover {
  background: linear-gradient(90deg, #00d4ff, #635bff);
  transform: translateY(-1px);
}

/* Adjust for mobile */
@media (max-width: 600px) {
  .bottom-bar {
    left: 10px;
    bottom: 10px;
    gap: 6px;
    padding: 5px 8px;
  }
  .bottom-bar input[type="email"].email-input {
    width: 140px;
    font-size: 0.8rem;
  }
  .bottom-bar .stripe-button {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
  }
}

/* === Compact Floating Contact Form (REPLACES previous #contact-form overrides) === */
#contact-form {
  position: fixed;
  bottom: 16px;
  left: 18px;
  z-index: 100;
  max-width: 220px;
  width: 220px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
  font-size: 0.8rem;
}

#contact-form p { margin: 0.35rem 0; }

#contact-form label {
  font-weight: 500;
  color: #ffeccc;
  font-size: 0.78rem;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  font-size: 0.78rem;
  padding: 0.32rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.92);
  color: #222;
  margin-top: 2px;
}

#contact-form textarea {
  height: 72px;
  resize: vertical;
}

#contact-form button {
  width: 100% !important;
  margin-top: 0.45rem;
  padding: 0.42rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 4px;
  background: linear-gradient(90deg, #b22222, #ff8c00);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#contact-form button:hover {
  background: linear-gradient(90deg, #ff8c00, #b22222);
}

/* Even smaller on mobile */
@media (max-width: 600px) {
  #contact-form {
    left: 10px;
    bottom: 10px;
    width: 190px;
    max-width: 190px;
    font-size: 0.75rem;
    padding: 8px 9px;
  }
}

/* Make the panel itself wider */
.contact-panel {
  position: fixed; bottom: 20px; left: 25px;   /* keep your positioning */
  width: 320px;                                 /* ← adjust */
  max-width: 320px;
  z-index: 100;
}

/* Then let the form fill the panel */
#contact-form { width: 20%; max-width: 100%; box-sizing: border-box; }
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  width: 100% !important; max-width: 100% !important; box-sizing: border-box;
}



.balance-card {
  margin: 1rem 0;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
}

.balance-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.balance-label {
  font-size: 0.9rem;
  color: #ffdba0;
  font-weight: 600;
}

.balance-amount {
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 700;
}

.topup-btn {
  width: auto !important;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  border-radius: 4px;
}


/* === Keep hero full-height so HIW starts below the fold === */
main.hero {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .75rem;
  padding: 2.5rem 2rem;
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) {
  main.hero { min-height: calc(100vh - 180px); }
}

/* Optional: anchor neuron graphic to hero */
main.hero .synapse-graphic {
  position: absolute;
  right: 2%;
  top: 18%;
  width: 300px;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

/* === Push How-it-works to the right on desktop so it doesn't sit under the fixed email form === */
:root { --hiw-left-gutter: 360px; } /* adjust to your form width + spacing */

@media (min-width: 1024px) {
  /* Target both classed and id-based markup, and override inline margins */
  .hiw__container,
  #how-it-works .hiw__container,
  #how-it-works .container {
    margin-left: var(--hiw-left-gutter) !important;
    margin-right: 1rem !important;
  }
}

/* === 2 × 2 grid for steps (force override of earlier inline rules) === */
.hiw__steps,
#how-it-works .hiw__steps {
  display: grid !important;
  gap: 1rem !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* On smaller screens: no gutter and stack to 1 column */
@media (max-width: 900px) {
  .hiw,
  #how-it-works { padding-left: 1rem; }
  .hiw__steps,
  #how-it-works .hiw__steps { grid-template-columns: 1fr !important; }
}


/* Raise the hero content a bit (top-third vibe) */
:root { --hero-offset-y: clamp(1rem, 8vh, 6rem); }

main.hero {
  justify-content: flex-start;      /* was center */
  padding-top: var(--hero-offset-y);
}

/* Optional: move the background image up a touch too */
main.hero .synapse-graphic {
  top: 10%;                         /* was ~18% */
}

/* On small screens, a smaller offset feels better */
@media (max-width: 768px) {
  :root { --hero-offset-y: 2rem; }
}
