body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f9f9f9;
  color: #222;
  line-height: 1.5;
}

/* Dark mode */
.dark {
  background-color: #121212;
  color: #eee;
}

.dark .content-wrapper {
  background: #1e1e1e;
}

.dark .faq-section {
  border-top: 1px solid #333;
}

.dark footer {
  color: #eee; /* improved contrast */
}

header {
  display: flex;
  justify-content: center;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
}

.header-wrapper {
  width: 960px; /* 160px ad + 800px content */
}

.ad-banner {
  height: 90px;
  min-height: 90px;
  background-color: #f0f0f0;
  text-align: center;
  line-height: 100px;
  font-size: 14px;
  color: #888;
  position: relative;
}

/* Label ad areas so they never look empty */
.ad-banner::after,
.ad-side.left::after {
  content: "Advertisement";
  display: block;
  font-size: 12px;
  color: #999;
  text-align: center;
  margin-top: 5px;
}

.logo-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
}

.logo {
  height: 80px;
}

#darkModeToggle {
  font-size: 25px;
  background: none;
  border: none;
  cursor: pointer;
}

.page-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
  gap: 10px;
}

.ad-side.left {
  width: 160px;
  height: 600px;
  min-height: 600px;
  background-color: #f0f0f0;
  text-align: center;
  line-height: 600px;
  font-size: 14px;
  color: #888;
  position: relative;
}

.content-wrapper {
  max-width: 800px;
  width: 100%;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

#emailGenerator,
#emailDisplay,
#countdownTimer,
#inboxContainer {
  margin-bottom: 1.5rem;
}

.email-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  flex-wrap: wrap;
}

#copyBtn,
#generateBtn,
#newEmailBtn,
.faq-toggle,
.back-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* Unified brand blue */
#copyBtn,
#generateBtn {
  background: #2596be;
  color: #fff;
}

#copyBtn:hover,
#generateBtn:hover {
  background: #1f7aa0;
}

#newEmailBtn {
  background: #6c757d;
  color: #fff;
}

#newEmailBtn:hover {
  background: #565e64;
}

.back-button {
  background: #007bff;
  color: #fff;
  text-decoration: none;
}

.back-button:hover {
  background: #0056b3;
}

button:focus,
.back-button:focus {
  outline: 2px solid #2596be;
  outline-offset: 2px;
}

.hidden {
  display: none;
}

#copyTooltip {
  font-size: 0.8rem;
  color: #555;
}

#customEmailInput {
  width: 100%;
  max-width: 500px;
  padding: 0.5rem;
  font-size: 1rem;
}

#countdownTimer {
  font-size: 1.4rem;
  font-weight: bold;
  color: #ff4136;
  margin-top: 10px;
}

.timer-label {
  font-size: 1rem;
  font-weight: bold;
  color: #666;
  margin-right: 0.5rem;
}

#emailDisplay h1 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #666;
}

#generatedEmail {
  font-size: 1.3rem;
  color: #2596be;
  font-weight: bold;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #777;
}

.intro {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.faq-section {
  border-top: 1px solid #ddd;
  padding-top: 1.5rem;
  margin-top: 5rem;
}

.faq-section h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #333;
}

.faq-item h3 {
  font-size: 1rem;
  margin-top: 1rem;
  color: #2596be;
}

.faq-item p {
  font-size: 0.95rem;
  color: #444;
}

/* Site intro */
.site-intro {
  text-align: center;
  padding: 10px;
  background: #f9f9f9;
  color: #333;
}

.site-intro h1 {
  margin: 0;
  font-size: 1.4rem;
}

.site-intro p {
  font-size: 0.95rem;
  color: #666;
  margin: 5px 0 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-container {
    flex-direction: column;
    align-items: center;
  }

  .ad-side.left {
    display: none;
  }

  .header-wrapper {
    width: 100%;
  }
}
