:root {
  --main: #f1f9f6;
  --card: #ffffff;
  --text-primary: #0f291e;
  --text-secondary: #4a6b5d;
  --shadow: rgba(15, 41, 30, 0.06);
  --lens-color: #00b22d;
  --lens-light: #90ee90;
}

body[data-theme="dark"] {
  --main: #0b1410;
  --card: #14221b;
  --text-primary: #f1f9f6;
  --text-secondary: #9cbdae;
  --shadow: rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--main);
  background-image: url('/assets/bg/bg1.png');
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-image .5s ease, background-color .5s ease, color .3s ease;
}

body[data-theme="light"] {
  background-image: url("/assets/bg/bg1.png");
  background-size: cover;
  background-position: center;
}

body[data-theme="dark"] {
  background-image: url("/assets/bg/bg2.png");
  background-size: cover;
  background-position: center;
}

.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 5%;
}

.hero-container {
  max-width: 800px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  padding: 50px 30px;
  border-radius: 24px;
  border: 1px solid rgba(0, 178, 45, 0.1);
  box-shadow: 0 20px 40px var(--shadow);
}

body[data-theme="dark"] .hero-container {
  background: rgba(20, 34, 27, 0.6);
  border: 1px solid rgba(0, 178, 45, 0.2);
}

.brand-badge {
  display: inline-block;
  background-color: #e3f4ee;
  color: #4a6b5d;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

body[data-theme="dark"] .brand-badge {
  background-color: #1a3a2b;
  color: var(--lens-light);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-title .highlight {
  color: #5bb377;
}

.hero-title .lens {
  color: var(--lens-color);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 35px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle a {
  color: var(--text-secondary);
  text-decoration: none;
}

.cta-group {
  display: flex;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--lens-color);
  color: white;
  box-shadow: 0 8px 20px rgba(0, 178, 45, 0.25);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 178, 45, 0.35);
  background-color: #009926;
}

.features-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 5%;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 45px;
}

.section-title-wrapper h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.section-title-wrapper p {
  color: var(--text-secondary);
}

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

.feature-card {
  background: var(--card);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 8px 24px var(--shadow);
  border: 1px solid rgba(0, 178, 45, 0.04);
  transition: background-color .3s ease;
}

.icon-box {
  font-size: 2rem;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.creator-section {
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 5%;
}

.creator-card {
  background: linear-gradient(135deg, #0f291e 0%, #1c4d38 100%);
  color: #ffffff;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(15, 41, 30, 0.2);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.creator-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(0, 178, 45, 0.2);
  filter: blur(80px);
  border-radius: 50%;
}

.creator-info {
  max-width: 600px;
  position: relative;
  z-index: 2;
}

.creator-info .badge {
  color: var(--lens-light);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.creator-info h2,
.behindTheCode {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 10px 0 15px 0;
  color: #ffffff !important;
}

.creator-info p {
  color: #b3cfc4;
  margin-bottom: 25px;
}

.creator-info a {
  color: #b3cfc4;
  text-decoration: none;
}

.tech-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tech-stack span {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

footer {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 25px 5%;
  border-top: 1px solid rgba(0, 178, 45, 0.08);
  color: var(--text-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 0.9rem;
  transition: background-color .3s ease;
}

footer a {
  text-decoration: none;
  color: var(--text-secondary);
}

body[data-theme="dark"] footer {
  background-color: rgba(20, 34, 27, 0.8);
  border-top: 1px solid rgba(0, 178, 45, 0.15);
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2rem;
  }

  .cta-group {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  footer {
    padding: 20px 5%;
    font-size: 0.8rem;
  }
  
  footer p {
    line-height: 1.8;
  }
}

.token-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-box {
  background: var(--card);
  color: var(--text-primary);
  padding: 25px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 25px var(--shadow);
  text-align: center;
  border: 1px solid rgba(0, 178, 45, 0.1);
}

body[data-theme="dark"] #messageModal .modal-box {
  background: #14221b;
  border: 1px solid rgba(0, 178, 45, 0.2);
}

.modal-box input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 6px;
  border: 1px solid rgba(0, 178, 45, 0.2);
  background: var(--main);
  color: var(--text-primary);
  box-sizing: border-box;
}


.modal-box button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

#saveToken {
  background: #00bcd4;
  color: #fff;
}

#closeModalBtn {
  background: #444;
  color: #aaa;
  margin-right: 10px;
}

#closeMessageBtn {
  background: var(--lens-color);
  color: #fff;
  padding: 10px 24px;
}

.register {
  font-size: 12px;
  color: var(--lens-color);
  text-decoration: none;
}

.fx-text-shimmer {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #475569 0%, #475569 40%, #fff 50%, #475569 60%, #475569 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fx-shimmer-text 2.2s linear infinite;
}

@keyframes fx-shimmer-text {
  to { background-position: -200% 50%; }
}

.fx-misc-switch {
  display: inline-flex;
  cursor: pointer;
}

.fx-misc-switch input {
  display: none;
}

.fx-misc-switch-track {
  width: 68px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  position: relative;
  transition: background 0.5s ease;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.15);
}

.fx-misc-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fef3c7, #fbbf24);
  box-shadow: 0 0 12px rgba(251,191,36,0.8);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.5s ease, box-shadow 0.5s ease;
}

.fx-misc-switch input:checked + .fx-misc-switch-track {
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
}

.fx-misc-switch input:checked + .fx-misc-switch-track .fx-misc-switch-thumb {
  transform: translateX(36px);
  background: radial-gradient(circle at 70% 30%, #e5e7eb, #94a3b8);
  box-shadow: inset -5px -3px 0 0 #475569, 0 0 12px rgba(203,213,225,0.4);
}

.fx-misc-switch {
  flex-shrink: 0;
}

.fx-misc-switch-track {
  backdrop-filter: blur(10px);
}

.theme-switch-container {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .theme-switch-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-label-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 28px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #e2e8f0;
  transition: .4s;
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.theme-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 2;
}

input:checked + .theme-slider {
  background-color: #00bcd4;
}

input:checked + .theme-slider:before {
  transform: translateX(26px);
}

.theme-icon {
  font-size: 0.85rem;
  user-select: none;
  z-index: 1;
}

.link-guide {
  font-size: 0.85rem;
  color: #00bcd4;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.link-guide:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.btn-modal {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-modal-secondary {
  background-color: #f1f5f9;
  color: #475569;
}

.btn-modal-secondary:hover {
  background-color: #e2e8f0;
  color: #1e293b;
}

.btn-modal-primary {
  background-color: #00bcd4;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 188, 212, 0.2);
}

.btn-modal-primary:hover {
  background-color: #00acc1;
  box-shadow: 0 4px 6px rgba(0, 188, 212, 0.3);
}

#closeMessageBtn {
  width: 100%;
  padding: 12px;
  background-color: #f1f5f9;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: background 0.2s;
}

#closeMessageBtn:hover {
  background-color: #e2e8f0;
}
