/* QR Code Generator Website Styles */
/* Modern, responsive design with light/dark mode support */

:root {
  /* Light mode colors */
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  --transition: all 0.2s ease-in-out;
  --transition-slow: all 0.3s ease-in-out;
}

[data-theme="dark"] {
  /* Dark mode colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --border-color: #334155;
  --border-light: #475569;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Header */
.main-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  width: 100%;
  display: block;
  overflow: hidden;
  isolation: isolate;
  contain: layout style;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.nav-brand {
  position: relative;
  z-index: 2;
  isolation: isolate;
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.25rem;
  position: relative;
}

.nav-brand svg {
  width: 28px;
  height: 28px;
  color: var(--primary-color);
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-color);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.language-selector {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  min-width: 120px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2rem;
}

.language-selector:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--primary-color);
}

.language-selector:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* RTL Support */
html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] .nav-links {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .language-selector {
  background-position: left 0.5rem center;
  padding-right: 0.75rem;
  padding-left: 2rem;
}

html[dir="rtl"] .form-row {
  flex-direction: row-reverse;
}

html[dir="rtl"] .nav-actions {
  gap: 1rem;
  flex-direction: row-reverse;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
  color: var(--primary-color);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: var(--transition);
}

[data-theme="light"] .theme-toggle .sun-icon,
[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 0;
  transform: rotate(180deg);
}

[data-theme="light"] .theme-toggle .moon-icon,
[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 1;
  transform: rotate(0deg);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
}

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

/* Main Content */
.main-content {
  min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-content {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
}

/* Generator */
.generator-wrapper {
  background-color: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.generator-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
}

.generator-form {
  padding: 2rem;
}

@media (max-width: 1024px) {
  .generator-content {
    grid-template-columns: 1fr;
  }
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Logo Upload Button Styles */
.upload-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

.logo-preview {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-width: 200px;
  background: var(--bg-primary);
}

.logo-preview img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.logo-preview small {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: block;
  text-align: center;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  line-height: 1;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

[data-theme="dark"] .alert-success {
  background-color: #064e3b;
  color: #a7f3d0;
}

[data-theme="dark"] .alert-error {
  background-color: #7f1d1d;
  color: #fca5a5;
}

/* Sections */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .section-header h2 {
    font-size: 2rem;
  }
}

/* Article Section */
.article-section {
  padding: 4rem 0;
  background-color: var(--bg-secondary);
}

.article-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
  text-align: center;
}

.article-text {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-text p {
  margin-bottom: 1.5rem;
}

/* Contact Section */
.contact-section {
  padding: 4rem 0;
  background-color: var(--bg-secondary);
}

.contact-form-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  background-color: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* FAQs Section */
.faqs-section {
  padding: 4rem 0;
  background-color: var(--bg-primary);
}

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

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.faqs-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-question {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: var(--transition);
  color: var(--primary-color);
}

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

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

.faq-item.active .faq-answer {
  max-height: 200px;
  padding-bottom: 1.5rem;
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Ad Placeholders */
.ad-placeholder {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border: 2px dashed #d1d5db;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-weight: 500;
  min-height: 120px;
  margin: 1rem 0;
  transition: var(--transition);
}

[data-theme="dark"] .ad-placeholder {
  background: linear-gradient(135deg, #374151, #4b5563);
  border-color: #6b7280;
  color: #9ca3af;
}

.ad-header {
  margin-bottom: 2rem;
}

.ad-sidebar {
  width: 300px;
  min-height: 600px;
  margin: 0;
  position: sticky;
  top: 100px;
}

.ad-footer {
  margin-top: 2rem;
  min-height: 100px;
}

@media (max-width: 1024px) {
  .ad-sidebar {
    display: none;
  }
}

/* Footer */
.main-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-brand a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-brand svg {
  width: 28px;
  height: 28px;
  color: var(--primary-color);
}

.footer-brand p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

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

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

.footer-social svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .footer-bottom-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Dynamic Fields Animation */
#dynamic-fields {
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition-slow);
}

#dynamic-fields.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-section {
    padding: 2rem 0;
  }
  
  .generator-form {
    padding: 1rem;
  }
  
  .contact-form {
    padding: 1rem;
  }
}

/* Print Styles */
@media print {
  .main-header,
  .main-footer,
  .ad-placeholder,
  .theme-toggle {
    display: none;
  }
  
  .main-content {
    margin: 0;
  }
  
  * {
    background: white !important;
    color: black !important;
  }
}

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

/* Focus indicators */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-secondary: #000000;
  }
  
  [data-theme="dark"] {
    --border-color: #ffffff;
    --text-secondary: #ffffff;
  }
}

/* Full Width Layout Styles */
.generator-content-full,
.about-content-full,
.contact-content-full,
.privacy-content-full,
.terms-content-full {
  display: block;
  width: 100%;
}

.generator-content-full .generator-form,
.about-content-full .about-main,
.contact-content-full .contact-form-section,
.privacy-content-full .privacy-main,
.terms-content-full .terms-main {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* Full Width Advertisement */
.ad-placeholder.ad-fullwidth {
  width: 100%;
  max-width: 728px;
  height: 300px;
  margin: 3rem auto 0;
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.ad-placeholder.ad-fullwidth::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    var(--bg-secondary) 25%, 
    transparent 25%, 
    transparent 75%, 
    var(--bg-secondary) 75%),
    linear-gradient(45deg, 
    var(--bg-secondary) 25%, 
    transparent 25%, 
    transparent 75%, 
    var(--bg-secondary) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  opacity: 0.1;
  z-index: 0;
}

.ad-placeholder.ad-fullwidth span {
  position: relative;
  z-index: 1;
}

.ad-placeholder.ad-fullwidth:hover {
  border-color: var(--primary-color);
  background: var(--bg-tertiary);
}

/* Responsive adjustments for full width ads */
@media (max-width: 768px) {
  .ad-placeholder.ad-fullwidth {
    height: 250px;
    margin: 2rem auto 0;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .ad-placeholder.ad-fullwidth {
    height: 200px;
    margin: 1.5rem auto 0;
    font-size: 0.875rem;
  }
}

/* Remove any existing sidebar styles that might conflict */
.generator-sidebar,
.about-sidebar,
.contact-info-section,
.privacy-sidebar,
.terms-sidebar {
  display: none;
}

/* Legacy grid layout overrides */
.generator-content,
.about-content,
.contact-content,
.privacy-content,
.terms-content {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

/* QR Code Preview Section */
.qr-preview-section {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  animation: slideInUp 0.3s ease-out;
}

.preview-header {
  text-align: center;
  margin-bottom: 2rem;
}

.preview-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.preview-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.qr-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.qr-image-container {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.qr-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.qr-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.qr-info {
  text-align: center;
}

.qr-details {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.qr-details span {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.download-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.download-actions .btn {
  min-width: 160px;
}

.error-message {
  color: #ef4444;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
}

[data-theme="dark"] .error-message {
  background: #422020;
  border-color: #7f2020;
}

/* Success button styling */
.btn.btn-success {
  background-color: var(--secondary-color);
  color: white;
  border: none;
}

.btn.btn-success:hover:not(:disabled) {
  background-color: #059669;
  transform: translateY(-1px);
}

.btn.btn-success:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.btn.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn.btn-secondary:hover {
  background-color: var(--bg-secondary);
  transform: translateY(-1px);
}

/* Responsive adjustments for QR preview */
@media (max-width: 768px) {
  .qr-preview-section {
    margin-top: 2rem;
    padding: 1.5rem;
  }
  
  .qr-image-container {
    width: 250px;
    height: 250px;
  }
  
  .qr-details {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .download-actions {
    flex-direction: column;
  }
  
  .download-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .qr-image-container {
    width: 200px;
    height: 200px;
  }
  
  .preview-header h3 {
    font-size: 1.25rem;
  }
}

/* Animation for QR preview section */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grid System Integration */
@import url('grid-system.css');

/* Enhanced responsive utilities */
.container-fluid {
    width: 100%;
    max-width: none;
    padding: 0 15px;
}

.container-lg {
    max-width: 1400px;
}

/* Mobile-first responsive typography */
@media (max-width: 576px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Improved focus states for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color, #007bff);
    outline-offset: 2px;
}

/* Enhanced loading states */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Performance Optimizations Integration */
@import url('performance-optimizations.css');

/* Critical Above-Fold Styles */
.hero-section {
    contain: layout style;
    will-change: transform;
}

.generator-form {
    contain: layout;
}

/* Resource Hints for Critical Assets */
.critical-fonts {
    font-display: swap;
}

/* Optimized Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Improved Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}
