:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --border: #dee2e6;
  --shadow: rgba(0, 0, 0, 0.1);
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

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

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 10px var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;

  a {
    text-decoration: none;
    color: #000;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  padding: 10px;
  border-radius: 5px;

  &:hover {
    border: 1px solid var(--text-secondary);
  }
}

.logo-icon {
  width: 36px;
  height: 36px;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-desktop a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

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

.github-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  transition: all 0.3s;
}

.github-btn:hover {
  background: var(--bg-secondary);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 15px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.nav-mobile.active {
  display: flex;
}

.nav-mobile a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 15px;
}

.download-count {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.feature-card {
  padding: 30px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

/* .feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow);
} */

.feature-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

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

/* Ad Space */
.ad-space {
  margin: 40px 0;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
}

.ad-placeholder {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Main Content */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 40px 0;
}

/* Upload Section */
.upload-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--bg-secondary);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: var(--bg-primary);
}

.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.upload-content h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.upload-content p {
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.upload-hint {
  font-size: 12px !important;
}

.uploaded-preview {
  position: relative;
  width: 100%;
}

.uploaded-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius);
}

.clear-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.clear-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.download-btn {
  width: 100%;
  padding: 16px 32px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.download-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
}

/* Preview Section */
.preview-section {
  background: var(--bg-secondary);
  padding: 30px;
  border-radius: var(--radius);
}

.preview-title {
  font-size: 24px;
  margin-bottom: 20px;
}

.preview-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px;
  background: var(--bg-primary);
  border-radius: 8px;
}

.preview-box {
  width: 80px;
  height: 80px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.preview-box canvas {
  max-width: 100%;
  max-height: 100%;
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.preview-info strong {
  font-size: 16px;
}

.preview-info span {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
  margin: 60px 0;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 10px;
}

.stat-label {
  color: var(--text-secondary);
}

/* How To Use */
.how-to-use {
  margin: 80px 0;
}

.how-to-use h2 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 50px;
}

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

.step {
  text-align: center;
}

.step-number {
  width: 60px;
  height: 60px;
  background: #3E9F5E;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 20px;
}

.step h3 {
  font-size: 22px;
  margin-bottom: 15px;
}

.step p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* FAQ */
.faq {
  margin: 80px 0;
}

.faq h2 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 10px;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px;
  background: none;
  border: none;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

.faq-question:hover {
  background: var(--bg-secondary);
}

.faq-icon {
  transition: transform 0.3s;
  font-size: 12px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 20px 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 0;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-section p,
.footer-section ul {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
}

/* Contact Page */
.contact-page {
  padding: 40px 0 80px;
}

.contact-hero {
  text-align: center;
  margin-bottom: 60px;
}

.contact-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 15px;
}

.contact-hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 80px;
}

/* Contact Info Cards */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: var(--bg-secondary);
  padding: 30px;
  border-radius: var(--radius);
  transition: transform 0.3s, box-shadow 0.3s;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow);
}

.info-icon {
  width: 50px;
  height: 50px;
  background: #3E9F5E;
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.info-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.info-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

.contact-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.3s;
}

.contact-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Contact Form */
.contact-form-wrapper {
  position: relative;
}

.form-card {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: var(--radius);
}

.form-card h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.form-description {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg-primary);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  padding: 14px 32px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-message {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Contact FAQ */
.contact-faq {
  margin-top: 80px;
}

.contact-faq h2 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 40px;
}

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

.faq-grid .faq-item {
  background: var(--bg-secondary);
  padding: 30px;
  border-radius: var(--radius);
  border: none;
}

.faq-grid .faq-item h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.faq-grid .faq-item p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 968px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 30px 20px;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

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

  .logo-text {
    display: none;
  }

  .main-content {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    display: flex;
    flex-wrap: wrap;
  }
}