/* CodQR.ro — Main Stylesheet */

:root {
  --primary: #6d5efc;
  --secondary: #22d3ee;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --text: #2d3748;
  --border: #e2e8f0;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

/* ============ Typography ============ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin-bottom: 1rem; }

.lead {
  font-size: 1.1rem;
  color: #666;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--secondary);
}

.link {
  color: var(--primary);
  border-bottom: 1px solid currentColor;
  cursor: pointer;
}

/* ============ Layout ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container.narrow {
  max-width: 800px;
}

.section {
  padding: 4rem 0;
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.section-head h2 {
  margin-bottom: 0.5rem;
}

.row2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ============ Navigation ============ */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
}

.brand em {
  color: var(--secondary);
  font-style: normal;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text);
}

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

/* ============ Hero Section ============ */
.hero {
  padding: 4rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hint {
  color: #999;
  font-size: 0.9rem;
}

.hint.center {
  text-align: center;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 2rem; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 12px rgba(109, 94, 252, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(109, 94, 252, 0.5);
}

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

.btn-ghost:hover {
  background: var(--light);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn.buy {
  width: 100%;
}

.btn-pro {
  background: #fff;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-pro:hover {
  background: var(--primary);
  color: white;
}

/* ============ Pricing Cards ============ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.price-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
}

.price-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(109, 94, 252, 0.2);
  transform: translateY(-8px);
}

.price-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.1), rgba(34, 211, 238, 0.1));
  transform: scale(1.05);
}

.pro-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.co-price {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 1rem 0;
}

.co-price small {
  font-size: 1rem;
  color: #999;
}

.co-features {
  list-style: none;
  margin: 1.5rem 0;
}

.co-features li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.co-features li:before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
  margin-right: 0.5rem;
}

.badge {
  display: inline-block;
  background: var(--success);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* ============ Configuration Panel ============ */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 2rem 0;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  background: var(--light);
}

.panel.controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
}

.ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ctrl-group label {
  font-weight: 600;
  font-size: 0.95rem;
}

.ctrl-group input,
.ctrl-group select,
.ctrl-group textarea {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
}

.ctrl-group input:focus,
.ctrl-group select:focus,
.ctrl-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.1);
}

.type-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.type-tab {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
  font-weight: 500;
}

.type-tab:hover {
  border-color: var(--primary);
}

.type-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.opt-tag {
  display: inline-block;
  background: var(--light);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  margin: 0.25rem;
  cursor: pointer;
}

.opt-tag.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.check input {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

/* ============ Preview ============ */
.preview-box {
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.preview-title {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #999;
}

.qr-empty {
  color: #999;
  text-align: center;
  padding: 2rem;
}

/* ============ Downloads ============ */
.downloads {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
}

.dl-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.file-btn {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.file-btn:hover {
  border-color: var(--primary);
  background: rgba(109, 94, 252, 0.1);
}

.export-holder {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

/* ============ Toast/Modal ============ */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  position: relative;
}

.modal.center {
  text-align: center;
}

.modal-x {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.modal-x:hover {
  color: var(--text);
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--success);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 2100;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(500px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============ Success Icon ============ */
.success-ico {
  width: 4rem;
  height: 4rem;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  margin: 0 auto 1rem;
}

/* ============ Uses Grid ============ */
.uses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.use-card {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
}

.use-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 16px rgba(109, 94, 252, 0.15);
}

.use-ico {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ============ Gradient Text ============ */
.grad-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ Logo Row ============ */
.logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  color: #999;
}

/* ============ Presets ============ */
.presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.preset {
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
  font-size: 0.9rem;
}

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

.preset.active {
  border-color: var(--primary);
  background: rgba(109, 94, 252, 0.1);
  color: var(--primary);
}

/* ============ Type Form ============ */
.type-form {
  display: grid;
  gap: 1rem;
}

/* ============ Footer ============ */
.footer {
  background: var(--dark);
  color: white;
  padding: 3rem 0;
  margin-top: 5rem;
  text-align: center;
}

.footer a {
  color: var(--secondary);
}

.footer a:hover {
  color: white;
}

/* ============ Tag/Badge ============ */
.tag {
  display: inline-block;
  background: var(--light);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  margin: 0.25rem;
}

/* ============ Share Button ============ */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

  .section {
    padding: 2rem 0;
  }

  .modal {
    width: 95%;
  }

  .toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }
}
