/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f6f8;
  color: #333;
  line-height: 1.6;
  padding-top: 130px;
}

a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.hero {
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  height: 120px;
  z-index: 100;
}

.header-content h1 {
  font-size: 2.2rem;
  color: #1a237e;
}

.subscribe-note {
  color: #666;
  font-style: italic;
  margin-top: 0.2rem;
  font-size: 1rem;
}

#subtitleContainer {
  flex: 2 1 400px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#subtitleText {
  font-weight: 600;
  font-size: 1.2rem;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  transition: opacity 0.6s ease;
  color: #1a237e;
  max-width: 100%;
}

#subtitleText.leaving {
  animation: slideFadeOut 1s forwards;
}

@keyframes slideFadeOut {
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(40px);
  }
}

/* Login */
.login-area {
  flex: 1 1 220px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.login-panel {
  display: flex;
  gap: 0.5rem;
}

.login-panel input {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
}

.login-panel button {
  padding: 0.4rem 0.8rem;
  background: #3f51b5;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.login-panel button:hover {
  background: #303f9f;
}

.welcome-user {
  margin-left: 1rem;
  font-weight: 600;
  color: #3f51b5;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Flash animation */
@keyframes flash {
  0% { background-color: #ffeb3b; }
  50% { background-color: #3f51b5; color: white; }
  100% { background-color: #ffeb3b; }
}

.flash {
  animation: flash 0.3s ease-in-out 2;
}

/* Container */
.container {
  max-width: 900px;
  margin: 30px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#form-heading {
  margin-bottom: 20px;
  font-size: 1.2em;
  font-weight: 600;
  text-align: center;
}

/* User Fields */
.user-fields input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.name-fields {
  display: flex;
  gap: 10px;
}

.name-fields input {
  width: 100%;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
}

select {
  width: 48%;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #bbb;
}

/* Prompts Section */
.prompt-section {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 20px;
}

.prompt-box {
  flex: 1 1 45%;
}

.scroll-list {
  max-height: 240px;
  overflow-y: auto;
  background: #f9f9f9;
  border-radius: 5px;
  padding: 10px;
}

.editable-list, .suggested-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.editable-list li, .suggested-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eef1f5;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.editable-list li span[contenteditable] {
  flex-grow: 1;
  outline: none;
}

.editable-list li button {
  background: none;
  border: none;
  color: #888;
  font-size: 1.2em;
  cursor: pointer;
}

.prompt-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.prompt-actions input {
  flex-grow: 1;
  padding: 8px;
}

.prompt-actions button {
  padding: 8px 12px;
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

/* Buttons */
#subscribe-btn, #login-toggle {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  background: #28a745;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
}

#login-toggle {
  background: #343a40;
}

/* Styled Disclaimer */
.styled-disclaimer {
  font-size: 0.95em;
  text-align: center;
  margin-top: 20px;
  padding: 10px;
  background: #eaf3ff;
  border-left: 4px solid #007bff;
  color: #333;
}

/* Examples */
.newsletter-examples {
  display: flex;
  justify-content: space-around;
  padding: 40px 10%;
  background: #fff;
  flex-wrap: wrap;
  gap: 20px;
}

.newsletter-examples img {
  max-width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.newsletter-examples img:hover {
  transform: scale(1.05);
}

.example {
  flex: 1 1 30%;
  text-align: center;
}

/* Testimonials */
.testimonials {
  padding: 40px 10%;
  background: #f9fafc;
  text-align: center;
}

.testimonial-slider {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.no-scroll::-webkit-scrollbar {
  display: none;
}

.testimonial-card {
  min-width: 250px;
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  scroll-snap-align: start;
  transition: transform 0.3s ease;
}

.testimonial-card:hover {
  transform: scale(1.02);
}

/* FAQ */
.faq-section {
  padding: 40px 10%;
  background: #f4f4f4;
}

.faq-item {
  margin-bottom: 20px;
}

.faq-toggle {
  width: 100%;
  text-align: left;
  padding: 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
}

.faq-content {
  background: white;
  padding: 15px;
  border-radius: 6px;
  margin-top: 5px;
}

.faq-content input {
  padding: 6px;
  margin-right: 10px;
  margin-top: 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.notify-btn {
  background: #28a745;
  border: none;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  background: #1a237e;
  color: white;
}

.footer-links-container {
  margin-top: 10px;
}

.footer-links {
  margin: 0 8px;
  cursor: pointer;
  color: #90caf9;
}

/* Popup overlays */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup {
  background: white;
  padding: 20px;
  border-radius: 10px;
  position: relative;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.popup img {
  max-width: 100%;
  border-radius: 8px;
}

.popup .close {
  position: absolute;
  top: 12px;
  right: 14px;
  cursor: pointer;
  font-size: 1.4em;
  color: #333;
}
