:root {
  --primary-color: #10b981;
  --primary-dark: #059669;
  --bg-color: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --header-bg: rgba(255, 255, 255, 0.95);
  --modal-bg: #ffffff;
  --modal-overlay: rgba(0, 0, 0, 0.5);
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.1);
  --shadow-heavy: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --border-light: #475569;
  --header-bg: rgba(15, 23, 42, 0.95);
  --modal-bg: #1e293b;
  --modal-overlay: rgba(0, 0, 0, 0.8);
  --shadow-light: rgba(0, 0, 0, 0.2);
  --shadow-medium: rgba(0, 0, 0, 0.3);
  --shadow-heavy: rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-color);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

header {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--shadow-light);
  transition: all 0.3s ease;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;
  position: relative;
  padding: 8px 0;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  width: 60px;
  height: 32px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 16px;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: var(--primary-color);
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .theme-toggle::before {
  transform: translateX(28px);
}

.theme-toggle:hover {
  border-color: var(--primary-color);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-muted);
  margin: 3px 0;
  transition: 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--shadow-light);
  padding: 20px;
}

.mobile-nav.active {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--shadow-light);
  transition: color 0.2s ease;
}

.mobile-nav a:hover {
  color: var(--primary-color);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.cta-button {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.hero {
  background: radial-gradient(
    ellipse at top,
    rgba(16, 185, 129, 0.05) 0%,
    transparent 50%
  );
  padding: 140px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: clamp(36px, 8vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-subtitle {
  color: var(--primary-color);
  display: block;
  position: relative;
}

.typing-text {
  position: relative;
  display: inline-block;
}

.typing-text::after {
  content: "|";
  position: relative;
  right: -2px;
  color: var(--primary-color);
  animation: blink 1s infinite;
  font-weight: 300;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.hero-description {
  font-size: clamp(16px, 4vw, 22px);
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 520px;
  font-weight: 400;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary,
.btn-secondary {
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-width: 160px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: clamp(16px, 4vw, 32px);
  margin-top: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-stat {
  text-align: center;
  min-width: 80px;
}

.hero-stat strong {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}

.hero-stat span {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.section {
  padding: clamp(60px, 12vw, 120px) 0;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(40px, 8vw, 80px);
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 800;
  color: var(--text-primary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.2;
}

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

.tool-card {
  background: var(--bg-color);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  height: fit-content;
  cursor: pointer;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.tool-card:hover::before {
  transform: translateX(0);
}

.tool-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.2);
}

.tool-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  object-fit: cover;
}

.tool-card h3 {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.tool-card p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
  font-size: clamp(14px, 3vw, 16px);
}

.tool-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-planned {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

.status-placeholder {
  background: rgba(156, 163, 175, 0.1);
  color: #6b7280;
}

.status-inprogress {
  background: rgba(251, 191, 36, 0.1);
  color: #ca8a04;
}

.status-beta {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
}

.status-live {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.about {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 100px);
  align-items: center;
}

.about-text .section-header {
  text-align: left;
  margin-bottom: 32px;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
  font-size: clamp(14px, 3vw, 18px);
}

.about-features {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-check {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  flex-shrink: 0;
}

.cta {
  background: var(--bg-secondary);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(16, 185, 129, 0.1) 0%,
    transparent 70%
  );
}

.cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.cta h2 {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.2;
  color: var(--text-primary);
}

.cta p {
  font-size: clamp(16px, 4vw, 20px);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cta-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: #fff;
  padding: 18px 40px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
  min-width: 180px;
  position: relative;
  overflow: hidden;
}

.btn-cta-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.footer {
  background: var(--bg-tertiary);
  padding: clamp(40px, 8vw, 80px) 0 40px;
  color: var(--text-primary);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(40px, 8vw, 80px);
  margin-bottom: clamp(40px, 8vw, 60px);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.footer-brand .logo {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.footer-brand span {
  font-weight: 700;
  font-size: 20px;
  color: var(--text-primary);
}

.footer-description {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: clamp(14px, 3vw, 16px);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(20px, 4vw, 40px);
}

.footer-column h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-column a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  color: var(--text-muted);
  transition: color 0.2s ease;
  font-size: 14px;
  text-decoration: none;
}

.footer-social a:hover {
  color: var(--primary-color);
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Message System */
.message {
  position: fixed;
  top: 100px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 12px;
  color: #fff;
  font-weight: 500;
  z-index: 2000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.message.success {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
}

.message.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.message.show {
  transform: translateX(0);
}

/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

button,
.btn-primary,
.btn-secondary,
.btn-cta-primary {
  position: relative;
  overflow: hidden;
}

/* Improved Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: var(--modal-bg);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: modalFadeIn 0.3s ease;
  border: 1px solid var(--border-color);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.05);
}

.modal-body {
  font-size: 16px;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.6;
}

.modal-body h3 {
  color: var(--text-primary);
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 700;
}

.modal-body p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-body img {
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 8px 25px var(--shadow-medium);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 16px;
  }

  nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 80px;
  }

  .hero-container {
    padding: 0 16px;
  }

  .hero-buttons,
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary,
  .btn-cta-primary {
    width: 100%;
    max-width: 300px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tool-card {
    padding: 24px;
  }

  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .hero-stat {
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .section-container {
    padding: 0 16px;
  }

  .modal-content {
    padding: 30px 20px;
  }

  .theme-toggle {
    margin-right: 8px;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 16px;
  }

  .hero-title {
    margin-bottom: 16px;
  }

  .hero-description {
    margin-bottom: 32px;
  }

  .tool-card {
    padding: 20px;
  }

  .tool-icon {
    width: 48px;
    height: 48px;
    font-size: 12px;
  }

  .about-feature span {
    font-size: 14px;
  }
}

.keyboard-nav *:focus {
  outline: 2px solid var(--primary-color) !important;
  outline-offset: 2px;
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 32px;
  }

  .section-subtitle {
    font-size: 24px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-cta-primary {
    padding: 14px 24px;
    font-size: 14px;
  }

  .tool-card {
    padding: 16px;
  }
}

@media (hover: none) {
  .tool-card:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }

  .tool-card:active {
    transform: scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .typing-text::after {
    animation: none;
  }
}

@media (prefers-contrast: high) {
  .tool-card {
    border-width: 2px;
    border-color: var(--text-primary);
  }

  .btn-primary,
  .btn-secondary {
    border-width: 2px;
  }
}
