:root {
  --bg-page: #F8FAFC;
  --bg-hero-start: #F0FDFA;
  --bg-hero-end: #F1F5F9;
  --bg-card: #FFFFFF;
  --primary-accent: #0D9488;
  --primary-accent-light: #CCFBF1;
  --text-dark: #1E293B;
  --text-medium: #475569;
  --text-light: #94A3B8;
  --border-color: #E2E8F0;
  --error-bg: #FEF2F2;
  --error-text: #DC2626;
  --warning-bg: #FFFBEB;
  --warning-text: #B45309;
  --success-bg: #ECFDF5;
  --success-text: #065F46;
  --upload-bg: #F8FAFC;
  --upload-border: #E2E8F0;
  --upload-active: #CCFBF1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-medium);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: 600;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

h2.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-dark);
  font-weight: 700;
}

h3.subsection-title {
  font-size: clamp(1rem, 3vw, 1.1rem);
  margin-bottom: 0.75rem;
}

/* FIXED: Main container - centered and full width */
main {
  padding: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* FIXED: Content sections - centered and full width */
.content-section {
  width: 100%;
  max-width: 100%;
}

/* FIXED: Converter section - centered */
.converter-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
}

/* FIXED: Card styling - centered */
.card {
  background-color: var(--bg-card);
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 0;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 100%;
}

.section-intro {
  font-size: 1.125rem;
  color: var(--text-medium);
  margin-bottom: 2rem;
  text-align: center;
  line-height: 1.8;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* FIXED: Grid layouts - now properly centered 3-column */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* FIXED: Use Cases Grid - 3 columns on desktop */
.usecases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .usecases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .usecases-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* FIXED: Tips Grid - 3 columns on desktop */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tips-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* FIXED: Advantages Grid - 3 columns on desktop */
.advantages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .advantages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* FIXED: Stories Grid - 3 columns on desktop */
.stories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card styles - equal height */
.overview-card,
.usecase-card,
.tip-card,
.advantage-card,
.story-card {
  background: var(--bg-page);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.overview-card:hover,
.usecase-card:hover,
.tip-card:hover,
.advantage-card:hover,
.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.overview-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.overview-icon i {
  font-size: 1.5rem;
  color: var(--primary-accent);
}

.overview-card h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-size: 1.25rem;
}

.overview-card p {
  color: var(--text-medium);
  line-height: 1.6;
  flex-grow: 1;
}

.usecase-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.usecase-icon i {
  font-size: 1.25rem;
  color: var(--primary-accent);
}

.usecase-card h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-size: 1.1rem;
}

.problem-solution {
  margin-bottom: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 0.5rem;
  border-left: 3px solid var(--primary-accent);
  line-height: 1.6;
}

.pro-tip {
  background: var(--warning-bg);
  border: 1px solid var(--warning-text);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.pro-tip strong {
  color: var(--warning-text);
}

.tip-number {
  width: 40px;
  height: 40px;
  background: var(--primary-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 1rem;
  font-size: 1rem;
  flex-shrink: 0;
}

.tip-card h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-size: 1.1rem;
  line-height: 1.3;
}

.tip-card p {
  color: var(--text-medium);
  line-height: 1.6;
  font-size: 0.9rem;
  flex-grow: 1;
  margin: 0;
}

.advantage-icon {
  width: 70px;
  height: 70px;
  background: var(--primary-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.advantage-icon i {
  font-size: 1.75rem;
  color: var(--primary-accent);
}

.advantage-card h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.advantage-card p {
  color: var(--text-medium);
  line-height: 1.6;
  flex-grow: 1;
}

.story-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.story-avatar {
  width: 50px;
  height: 50px;
  background: var(--primary-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-avatar i {
  font-size: 1.25rem;
  color: var(--primary-accent);
}

.story-meta h4 {
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.story-meta span {
  color: var(--text-light);
  font-size: 0.875rem;
}

.story-content p {
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-style: italic;
  flex-grow: 1;
}

.story-results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.result-metric {
  background: white;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border-left: 3px solid var(--primary-accent);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Guide Steps - Better Layout */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
  width: 100%;
}

.guide-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  width: 100%;
}

@media (max-width: 640px) {
  .guide-step {
    flex-direction: column;
    gap: 1rem;
  }
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--primary-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.quick-tip {
  background: var(--success-bg);
  border-left: 3px solid var(--success-text);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  line-height: 1.6;
}

.troubleshooting {
  background: var(--error-bg);
  border-left: 3px solid var(--error-text);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  line-height: 1.6;
}

/* FAQ Section - Better Spacing */
.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-item h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-size: 1.1rem;
}

.faq-item p {
  color: var(--text-medium);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Technical Section - Better Readability */
.technical-content {
  margin-top: 1.5rem;
}

.technical-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
}

.technical-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.technical-section h3 {
  margin-bottom: 1.25rem;
  color: var(--text-dark);
  font-size: 1.3rem;
}

.technical-section p {
  color: var(--text-medium);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

/* Navigation */
.navbar {
  background-color: var(--bg-card);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem clamp(0.75rem, 3vw, 1rem);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo {
  height: 32px;
  width: auto;
}

.brand-name {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1.1rem;
}

/* Navigation Toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 0.25rem;
  z-index: 1002;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-dark);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Navigation Slider */
.nav-slider {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-card);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease-in-out;
  z-index: 1001;
  overflow-y: auto;
}

.nav-slider.active {
  right: 0;
}

.slider-content {
  padding: 1.5rem;
  height: 100%;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.slider-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1002;
}

.slider-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slider-link {
  display: block;
  padding: 1rem;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.slider-link:hover, .slider-link.active {
  background-color: var(--primary-accent-light);
  color: var(--primary-accent);
}

/* Overlay when slider is open */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.main-card {
  border-top: 4px solid var(--primary-accent);
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 768px) {
  .main-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Form Styles */
.form-section {
  width: 100%;
}

.input-group {
  margin-bottom: 1.5rem;
}

.form-section label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(0.8rem, 2.5vw, 0.875rem);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-section input, .form-section select {
  width: 100%;
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  background-color: var(--bg-page);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-section input:focus, .form-section select:focus {
  outline: none;
  background-color: white;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px var(--primary-accent-light);
}

.calculate-button {
  width: 100%;
  background-color: var(--primary-accent);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 1rem;
}

.calculate-button:hover {
  background-color: #0b8378;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

/* Tab Buttons */
.tab-buttons {
  display: flex;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
}

.tab-button {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  background: transparent;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin: 0;
  color: var(--text-medium);
}

.tab-button.active {
  background: var(--primary-accent);
  color: white;
}

/* Protocol Toggle */
.protocol-toggle {
  display: flex;
  background: var(--bg-page);
  border-radius: 0.5rem;
  padding: 4px;
  margin-bottom: 10px;
  width: fit-content;
  border: 1px solid var(--border-color);
}

.protocol-toggle button {
  padding: 6px 12px;
  border: none;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--text-medium);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin: 0;
  width: auto;
}

.protocol-toggle button.active {
  background: var(--primary-accent);
  color: white;
}

.input-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

#protocolDisplay {
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

/* Scan Options */
.scan-options {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.scan-option-button {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin: 0;
  color: var(--text-medium);
}

.scan-option-button.active {
  background: var(--primary-accent);
  color: white;
  border-color: var(--primary-accent);
}

/* Scanner Container */
.scanner-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 1.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

#scanner {
  width: 100%;
  display: block;
}

.scanner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-weight: bold;
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--upload-border);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  background-color: var(--upload-bg);
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.upload-area:hover, .upload-area.active {
  border-color: var(--primary-accent);
  background-color: var(--upload-active);
}

.upload-content i {
  font-size: 3rem;
  color: var(--primary-accent);
  margin-bottom: 1rem;
}

.upload-content h3 {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.upload-content p {
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.file-types {
  font-size: 0.875rem;
  color: var(--text-light);
}

.uploaded-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: 0.5rem;
  margin: 15px 0;
  border: 2px solid var(--border-color);
}

/* Results Section */
.results-section {
  width: 100%;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.result-box {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--bg-page);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  width: 100%;
}

.result-box.primary {
  background-color: var(--primary-accent-light);
  border-color: var(--primary-accent);
}

.result-label {
  font-size: 0.875rem;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.result-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.result-box small {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* QR Code Preview */
.preview-section {
  width: 100%;
}

.preview-container {
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: var(--bg-page);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.qr-preview {
  padding: 1rem;
  text-align: center;
  color: var(--text-light);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-preview canvas {
  border: 10px solid white;
  border-radius: 0.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  max-width: 100%;
}

/* Scanned Result */
.scanned-result {
  width: 100%;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

@media (min-width: 480px) {
  .action-buttons {
    flex-direction: row;
  }
}

.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  flex: 1;
}

.print-button {
  background-color: var(--primary-accent);
  color: white;
}

.print-button:hover {
  background-color: #0b8378;
}

.save-button {
  background-color: var(--bg-page);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.save-button:hover {
  background-color: var(--border-color);
}

/* Privacy Notice */
.privacy-notice {
  background: var(--primary-accent-light);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary-accent);
}

.privacy-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-accent);
  margin-bottom: 0.5rem;
}

.privacy-text {
  font-size: 0.875rem;
  color: var(--text-medium);
  line-height: 1.5;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--bg-hero-start) 0%, var(--bg-hero-end) 100%);
  padding: clamp(2rem, 6vw, 4rem) 1rem;
  margin-bottom: 1.5rem;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-text h1 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: clamp(1rem, 3vw, 1.125rem);
  max-width: 800px;
  margin: 0 auto 2rem;
  color: var(--text-medium);
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.cta-button:hover {
  background-color: #0b8378;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.3);
}

/* Footer */
.footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer p {
  margin-bottom: 1rem;
  color: var(--text-medium);
}

.footer a {
  color: var(--primary-accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-medium);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--primary-accent);
}

.disclaimer {
  font-size: 0.875rem;
  color: var(--text-light);
  max-width: 800px;
  margin: 0 auto;
}

/* Animations */
.animate-on-load {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile QR Code Optimizations */
@media (max-width: 480px) {
  .qr-preview canvas {
    max-width: 100% !important;
    max-height: 200px !important;
    width: auto !important;
    height: auto !important;
  }
  
  .preview-container {
    min-height: 200px !important;
    padding: 0.5rem !important;
  }
  
  .result-value {
    font-size: 1.25rem !important;
  }
}

/* Responsive Adjustments */
@media (max-width: 767px) {
  .nav-container {
    padding: 0.5rem 0.75rem;
  }
  
  .nav-slider {
    width: 280px;
  }
  
  .hero-section {
    padding: 1.5rem 0.75rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .protocol-toggle {
    width: 100%;
  }
  
  .protocol-toggle button {
    flex: 1;
  }
  
  .upload-area {
    padding: 1.5rem;
  }
  
  .upload-content i {
    font-size: 2.5rem;
  }
  
  .scanner-container {
    max-width: 100%;
  }
  
  .preview-container {
    min-height: 250px;
  }
  
  .qr-preview canvas {
    max-width: 90%;
    max-height: 250px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .navbar, .hero-section, .footer {
    display: none;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .main-grid {
    display: block;
  }
  
  .calculate-button, .action-button {
    display: none;
  }
}

/* MOBILE MEMORY FIX: Limit canvas sizes */
.qr-preview canvas {
  max-width: 200px !important;
  max-height: 200px !important;
  width: auto !important;
  height: auto !important;
}

/* MOBILE FIX: Prevent memory-heavy animations */
@media (max-width: 768px) {
  .animate-on-load {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  
  .preview-container {
    min-height: 200px !important;
  }
}