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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #d1dae0;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.logo-link:hover .logo {
  opacity: 0.8;
}

/* Hamburger Menu */
.menu-toggle {
  position: absolute;
  right: 24px;
  left: auto;
  top: 41%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 2px;
}

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

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

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

.side-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  padding: 80px 0 40px;
  overflow-y: auto;
}

.side-menu.open {
  right: 0;
}

.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.side-menu-overlay.show {
  display: block;
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-menu ul li {
  border-bottom: 1px solid var(--border);
}

.side-menu ul li a {
  display: block;
  padding: 16px 24px;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.side-menu ul li a:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.side-menu ul li a i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.header .container {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding-left: 60px;
}

.index-header .container {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.index-header .logo-link {
  flex-shrink: 0;
}

.index-header .tagline {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

.logo-link {
  text-align: center;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 18px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.steps {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 8px;
}

.steps strong { color: var(--primary); }

.step-link {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.step-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.step-text {
  color: var(--text-light);
}

/* Ad Banner */
.ad-banner {
  margin-top: 24px;
  margin-bottom: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 40px 24px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Color Grid */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 20px;
  max-width: 600px;
}

.color-option {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid transparent;
  transition: all 0.2s ease;
  margin: 0 auto;
}

.color-option:hover {
  transform: scale(1.1);
  border-color: var(--border);
}

.color-option.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Color Swatch Cards */
.color-swatch {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 16px;
  border: 3px solid var(--border);
  transition: transform 0.2s ease;
}

.card:hover .color-swatch {
  transform: scale(1.15);
}

#color-grid .card p {
  font-size: 0.8rem;
}

/* Template List */
.download-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

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

.template-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.template-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.template-preview {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-light);
}

.template-info {
  padding: 20px;
}

.template-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.template-info p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.download-btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease;
  width: 100%;
  text-align: center;
}

.download-btn:hover {
  background: var(--primary-dark);
}

/* Sidebar Ad */
.sidebar-ad {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 100px;
}

/* Footer */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: auto;
}

.footer a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Legal Content */
.legal-content {
  max-width: 800px;
  line-height: 1.8;
}

.legal-content h3 {
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--primary);
}

.legal-content ul {
  margin-left: 20px;
  margin-bottom: 16px;
}

.legal-content li {
  margin-bottom: 8px;
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1e293b;
  color: white;
  padding: 20px;
  z-index: 10000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  display: none;
}

.cookie-banner.show {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 300px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-text a {
  color: #93c5fd;
  text-decoration: underline;
}

.cookie-text a:hover {
  color: #bfdbfe;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie-btn.accept {
  background: #2563eb;
  color: white;
}

.cookie-btn.accept:hover {
  background: #1d4ed8;
}

.cookie-btn.reject {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.cookie-btn.reject:hover {
  background: rgba(255,255,255,0.1);
}

.cookie-btn.settings {
  background: rgba(255,255,255,0.1);
  color: white;
}

.cookie-btn.settings:hover {
  background: rgba(255,255,255,0.2);
}

/* Cookie Settings Modal */
.cookie-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10001;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal.show {
  display: flex;
}

.cookie-modal-content {
  background: white;
  color: #1e293b;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.cookie-modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.cookie-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

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

.cookie-setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}

.cookie-setting-item:last-child {
  border-bottom: none;
}

.cookie-setting-info h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.cookie-setting-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #2563eb;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-modal-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

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

  .sidebar-ad {
    position: static;
    min-height: 250px;
  }

  .section-title { font-size: 1.5rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .template-list { grid-template-columns: 1fr; }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-text {
    min-width: auto;
  }

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

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 48px 24px;
  margin-bottom: 32px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius);
  color: #fff;
}

.hero-heading {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero-text {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 12px;
  opacity: 0.92;
}

.hero-link {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.hero-link:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 32px 20px;
  }
  .hero-heading {
    font-size: 1.4rem;
  }
  .hero-text {
    font-size: 0.95rem;
  }
}
