/* ===== CSS Variables ===== */
:root {
  --bg: #0c0c0f;
  --text: #f6f7fb;
  --muted: #9aa0a9;
  --accent: #009f90;
  --line: rgba(255, 255, 255, .08);
  --card: #13141a;
}

/* ===== Base Styles ===== */
* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* ===== Logo Styles ===== */
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.logo img {
  height: 40px;
  width: auto;
}

/* ===== Layout Components ===== */
.container {
  margin: 2em auto 4em auto;
  width: min(900px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 0;
}

/* ===== Typography ===== */
h1[contenteditable] {
  outline: none;
  margin: 0;
  font-size: clamp(28px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: .2px;
  line-height: normal;
  overflow-wrap: break-word;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 4px 8px;
  transition: border-color 0.2s ease;
}

h1[contenteditable]:focus {
  border-color: var(--accent);
}

h1[contenteditable]:hover {
  border-color: var(--accent);
}

h1[contenteditable].placeholder {
  color: var(--accent);
}

p[contenteditable] {
  outline: none;
  margin: 0;
  font-size: clamp(16px, 2.2vw, 22px);
  color: var(--text);
  max-width: 42ch;
  overflow-wrap: break-word;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 4px 8px;
  transition: border-color 0.2s ease;
}

p[contenteditable]:focus {
  border-color: var(--accent);
}

p[contenteditable]:hover {
  border-color: var(--accent);
}

p[contenteditable].placeholder {
  color: var(--text);
}

.limit {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* ===== Form Components ===== */
.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
}

.seg {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
}

.seg label {
  font-size: 18px;
  color: var(--text)
}

.seg input,
.seg select {
  background: #0b0c10;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 6px 5px;
  outline: none;
  font: inherit;
}

.seg input[type="number"] {
  width: 5.5ch;
  text-align: center;
}

.seg input[type="date"],
.seg input[type="time"] {
  padding: 6px 8px;
}

/* ===== Button Styles ===== */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #161821;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  color: #08210b;
  border-color: transparent;
}

/* ===== Utility Classes ===== */
.muted {
  color: var(--muted);
  font-size: 13px
}

.hr {
  height: 1px;
  width: 100%;
  background: var(--line);
  margin: 6px 0;
}

.status {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.hidden {
  display: none !important;
}

/* ===== Create New Message Button ===== */
.create-new {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* ===== Expired State ===== */
.expired {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 900;
  overflow-wrap: break-word;
}

/* ===== Viewer Elements ===== */
#vTitle,
#vDesc {
  overflow-wrap: break-word;
}

/* ===== Landing Page Sections ===== */
.landing-sections {
  margin-top: 0;
  background: var(--bg);
  width: 100%;
}

.landing-sections .container {
  margin: auto;
  width: min(900px, 92vw);
  padding: 24px;
  text-align: center;
}

.landing-hero {
  background: linear-gradient(135deg, var(--card) 0%, var(--bg) 100%);
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid var(--line);
  width: 100%;
}

.landing-title {
  font-size: clamp(32px, 8vw, 72px);
  font-weight: 900;
  margin: 0 0 24px 0;
  color: var(--text);
  line-height: 1.1;
}

.landing-subtitle {
  font-size: clamp(18px, 3vw, 24px);
  color: var(--muted);
  margin: 0 0 40px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

.landing-cta,
.landing-cta-final {
  font-size: 18px;
  padding: 16px 32px;
  margin-top: 20px;
}

.landing-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.landing-section.alt {
  background: var(--card);
}

.landing-section h2 {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 800;
  margin: 0 0 32px 0;
  color: var(--text);
  text-align: center;
}

.section-intro {
  font-size: clamp(18px, 3vw, 22px);
  color: var(--text);
  margin: 0 0 48px 0;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* Features Grid */
.features-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px;
  margin-top: 48px;
}

.feature-card {
  background: var(--card);
  padding: 32px 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text);
}

.feature-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* Steps Grid */
.steps-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 32px;
  margin: 48px 0;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  margin: 0 auto 24px auto;
}

.step-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
}

.step-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.highlight-box {
  background: var(--accent);
  color: var(--bg);
  padding: 32px;
  border-radius: 12px;
  margin-top: 48px;
  text-align: center;
}

.highlight-box p {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

/* Benefits Grid */
.benefits-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 32px;
  margin-top: 48px;
}

.benefit-card {
  background: var(--card);
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.benefit-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.benefit-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.benefit-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
}

.benefit-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Use Cases Grid */
.use-cases-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px;
  margin-top: 48px;
}

.use-case-card {
  background: var(--bg);
  padding: 28px 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.use-case-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.use-case-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text);
}

.use-case-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
  font-size: 14px;
}

/* FAQ Grid */
.faq-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 32px;
  margin-top: 48px;
}

.faq-item {
  background: var(--card);
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.faq-item h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--accent);
}

.faq-item p {
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

/* Final CTA Section */
.landing-cta-section {
  background: linear-gradient(135deg, var(--accent) 0%, #007a6b 100%);
  color: var(--bg);
  padding: 80px 0;
  text-align: center;
  width: 100%;
}

.landing-cta-section h2 {
  font-size: clamp(32px, 7vw, 56px);
  font-weight: 900;
  margin: 0 0 24px 0;
  color: var(--bg);
}

.landing-cta-section p {
  font-size: clamp(18px, 3vw, 22px);
  margin: 0 0 40px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
  opacity: 0.9;
}

.landing-cta-final {
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--bg);
}

.landing-cta-final:hover {
  background: transparent;
  color: var(--bg);
  border-color: var(--bg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .landing-hero {
    padding: 60px 0;
  }

  .landing-section {
    padding: 60px 0;
  }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .use-cases-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
  }

  .faq-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .landing-cta-section {
    padding: 60px 0;
  }

  .support-btn {
    width: 20px;
    height: 20px;
    top: 15px;
    right: 15px;
  }

  .support-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* Support Button */
.support-btn {
  position: fixed;
  background: var(--card);
  border-color: var(--accent);
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: var(--muted);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.support-btn:hover {
  background: var(--accent);
  color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.support-btn svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  transition: color 0.3s ease;
}

.support-btn:hover svg {
  color: var(--text);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg);
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.modal-header h2 {
  margin: 0;
  color: var(--accent);
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

.modal-body {
  padding: 0 24px 24px 24px;
}

.modal-body p {
  margin-bottom: 24px;
  line-height: 1.6;
  color: var(--text);
}

.support-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.support-link {
  display: block;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.support-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.support-link-name {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
  display: block;
}

.support-link-description {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
