h1 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #111827;
}

/* Prevent horizontal scrollbar */
html, body {
  overflow-x: hidden;
}

/* Font display swap to prevent FOIT layout shifts */
@font-face {
  font-family: "Font Awesome 6 Free";
  font-display: swap;
}
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-display: swap;
}

/* Reserve space for speedtest container to prevent CLS */
#root {
  min-height: 420px;
}

/* Reserve space for ad slots to prevent CLS */
.ads-body-top .ads {
  min-height: 195px;
}

.ads-sidebar {
  min-height: 250px;
}

.speedtest-container {
  margin: auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  padding: 24px 24px;
  border-radius: 10px;
  text-align: center;
  font-family: Inter, sans-serif;
}



.server {
  color: #6366f1;
  font-size: 14px;
  margin: 12px 0;
}

/* ==================== DUAL SEMI-GAUGE (SPEEDOMETER) ==================== */

.dual-gauges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px auto 32px;
  max-width: 520px;
}

@media (max-width: 576px) {
  .speedtest-container {
    padding: 12px 8px;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }
  .dual-gauges {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
    gap: 8px;
    margin: 12px auto 12px;
  }
  .semi-gauge {
    padding: 6px 4px 4px;
  }
  .semi-gauge__svg {
    max-width: 130px;
  }
  .semi-gauge__value {
    font-size: 1.1rem;
    margin-top: -6px;
  }
  .semi-gauge__label {
    font-size: 0.6rem;
    margin-bottom: 2px;
  }
  .semi-gauge__unit {
    font-size: 0.6rem;
  }
  .metrics-inline {
    flex-direction: row;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  .metric-separator {
    display: inline;
  }
}

.semi-gauge {
  text-align: center;
  padding: 12px 8px 8px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.semi-gauge--active {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.semi-gauge--done {
  border-color: #6366f1;
  background: #eef2ff;
}

.semi-gauge__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 1.5em;
}

.semi-gauge--active .semi-gauge__label {
  color: #4f46e5;
}

.semi-gauge__wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.semi-gauge__svg {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.semi-gauge__progress {
  transition: stroke-dashoffset 0.4s ease;
}

.semi-gauge__needle {
  /* Animated via SVG transform attribute directly */
}

.semi-gauge__scale {
  font-size: 5.5px;
  fill: #9ca3af;
  font-weight: 400;
  text-anchor: middle;
}

.semi-gauge__value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #4f46e5;
  margin-top: -8px;
}

.semi-gauge--done .semi-gauge__value {
  color: #4f46e5;
}

.semi-gauge__unit {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: -4px;
}

/* ==================== END DUAL SEMI-GAUGE ==================== */

/* ==================== SERVER SELECTOR ==================== */

.server-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 4px;
  font-size: 0.85rem;
}

.server-selector label {
  color: #6366f1;
  font-weight: 500;
  white-space: nowrap;
}

.server-select {
  padding: 4px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #374151;
  background: #ffffff;
  max-width: 280px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.server-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

@media (max-width: 576px) {
  .server-selector {
    flex-direction: column;
    gap: 4px;
  }
  .server-select {
    max-width: 100%;
    width: 100%;
  }
}

/* ==================== END SERVER SELECTOR ==================== */

/* ==================== USER NETWORK INFO ==================== */

.user-network-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  font-size: 0.8rem;
  color: #6b7280;
  margin: 10px 0;
  text-align: center;
}

.user-network-info i {
  color: #6366f1;
  margin-right: 4px;
}

.net-info-sep {
  margin: 0 2px;
}

@media (max-width: 576px) {
  .user-network-info {
    flex-direction: column;
    gap: 2px;
    font-size: 0.75rem;
  }
  .net-info-sep {
    display: none;
  }
}

/* ==================== END USER NETWORK INFO ==================== */

/* ==================== RATE LIMIT MESSAGE ==================== */

.rate-limit-msg {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #92400e;
  text-align: center;
  margin: 8px auto 12px;
  max-width: 420px;
}

.btn-reload {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #d97706;
  background: #ffffff;
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-reload:hover {
  background: #fef3c7;
}

/* ==================== END RATE LIMIT ==================== */

.value {
  font-size: 48px;
  font-weight: 700;
  color: #6366f1;
}

.unit {
  font-size: 16px;
  color: #94a3b8;
}

.label {
  font-size: 14px;
  color: #6366f1;;
}

.bar {
    max-width: 300px;
    /* background: #6d729b; */
    padding: 5px;
    border-radius: 8px;
    margin: 8px auto;
    color: #495057;
    font-weight: 700;
    font-size: 22px;
}

.bars {
    margin-top: 32px;
}

/* Result Metrics Inline */
.metrics-inline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  padding: 10px 22px 10px 0;
  font-size: 0.9rem;
  color: #4b5563;
  max-width: 520px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.metric-item strong {
  color: #374151;
}

.metric-separator {
  color: #d1d5db;
}

@media (max-width: 576px) {
  .metrics-inline {
    flex-direction: row;
    gap: 8px;
    font-size: 0.8rem;
  }
  .metric-separator {
    display: inline;
  }
}

.result-card__label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bar.active {
  /* background: #cbd5e1; */
  color: #495057;
}

.test-status {
  max-width: 420px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #eef2ff;
  color: #374151;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.test-status strong {
  color: #4338ca;
  font-size: 14px;
}

.test-status span {
  font-size: 14px;
  color: #4b5563;
}

.test-status.error {
  background: #fef2f2;
}

.test-status.error strong {
  color: #b91c1c;
}

.test-status.error span {
  color: #991b1b;
}

.btn-start {
  max-width: 300px;
  padding: 6px 20px;
  border-radius: 10px;
  border: none;
  background: #6366f1;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-start:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.speedtest-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

@media (max-width: 576px) {
  .speedtest-actions {
    gap: 6px;
  }
  .speedtest-actions .btn-start {
    font-size: 0.75rem;
    padding: 8px 14px;
    width: 100%;
  }
  .speedtest-actions .btn-secondary {
    font-size: 0.7rem;
    padding: 6px 10px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
  }
}

.btn-secondary {
  max-width: 300px;
  padding: 6px 20px;
  border-radius: 12px;
  border: 1px solid #c7d2fe;
  background: #ffffff;
  color: #4338ca;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
}

.camera-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  background-color: #f3f4f6;
  border-radius: 0.5rem;
  overflow: hidden;
}

/* ==================== TRANSFORMAÇÕES DA CÂMERA ==================== */

.camera-feed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Switch Toggle Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4f46e5;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Slider de Rotação */
#rotationSlider {
  accent-color: #4f46e5;
}

#rotationSlider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  background: #4f46e5;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
}

#rotationSlider::-webkit-slider-thumb:hover {
  background: #3730a3;
  transform: scale(1.2);
}

#rotationSlider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #4f46e5;
  cursor: pointer;
  border-radius: 50%;
  border: none;
  transition: all 0.2s;
}

#rotationSlider::-moz-range-thumb:hover {
  background: #3730a3;
  transform: scale(1.2);
}

.btn-rotation {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-rotation:active {
  transform: scale(0.95);
}

/* Melhorias visuais para os cards */
#cameraSettingsBox .bg-white {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

#cameraSettingsBox .bg-white:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

/* Estilo para os botões de atalho de rotação */
#cameraSettingsBox button[onclick^="setRotation"] {
  font-weight: 600;
}

#cameraSettingsBox button[onclick^="setRotation"]:active {
  transform: scale(0.95);
}
/* ==================== STEPPER PROGRESS INDICATOR ==================== */

.speedtest-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 16px auto 24px;
  max-width: 500px;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.stepper-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.stepper-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
}

/* Completed step: solid indigo fill with white checkmark */
.stepper-step--completed .stepper-icon {
  background: #4f46e5;
  color: #ffffff;
  border: 2px solid #4f46e5;
}

.stepper-step--completed .stepper-label {
  color: #4f46e5;
}

/* Active step: indigo outline/highlight with pulsing animation */
.stepper-step--active .stepper-icon {
  background: #ffffff;
  color: #4f46e5;
  border: 2px solid #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
  animation: stepper-pulse 1.5s ease-in-out infinite;
}

.stepper-step--active .stepper-label {
  color: #4f46e5;
  font-weight: 600;
}

/* Pending step: gray fill, no icon */
.stepper-step--pending .stepper-icon {
  background: #d1d5db;
  color: #d1d5db;
  border: 2px solid #d1d5db;
}

.stepper-step--pending .stepper-label {
  color: #9ca3af;
}

/* Connecting lines between steps */
.stepper-line {
  flex: 1;
  height: 2px;
  min-width: 32px;
  margin: 0 4px;
  border-radius: 1px;
  align-self: center;
  margin-bottom: 22px;
  transition: background 0.3s ease;
}

.stepper-line--filled {
  background: #4f46e5;
}

.stepper-line--pending {
  background: #d1d5db;
}

/* Pulsing animation for active step */
@keyframes stepper-pulse {
  0% {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(79, 70, 229, 0.1);
  }
  100% {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
  }
}

/* ==================== END STEPPER ==================== */

@media screen and (min-width: 768px) {
    #navbarNav:not(.navbar-collapse-custom) {
        display: flex !important;
        flex-basis: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
    }
    #navbarNav:not(.navbar-collapse-custom) {
        max-height: none !important;
    }
}

/* Responsividade aprimorada */
@media (max-width: 768px) {
  #cameraSettingsBox {
    max-width: 100% !important;
    padding: 1rem;
  }
  
  #cameraSettingsBox .grid-cols-1 {
    gap: 1rem;
  }
  
  .btn-rotation span {
    display: none;
  }
  #navbarNav.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
}
}

/* Animação no slider de rotação */
#rotationSlider:active::-webkit-slider-thumb {
  transform: scale(1.3);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

#rotationSlider:active::-moz-range-thumb {
  transform: scale(1.3);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

@keyframes flashAnimation {
    0% { opacity: 0; }
    50% { opacity: 0.8; }
    100% { opacity: 0; }
}

#gallery {
  max-height: 310px;   /* ajuste para o valor desejado */
  overflow-y: auto;
  padding-right: 8px;  /* espaço pro scrollbar */
}

#emptyGallery {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gallery-item {
  transition: all 0.2s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.info-card {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}


.btn-primary {
  background: #6366f1;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: #4338ca;
}
.btn-secondary {
  background: #eef2ff;
  transition: background 0.2s;
}
.btn-secondary:hover {
  background: #e0e7ff;
}
/* Corrige bordas e remoção de segundo ícone download */
#downloadAll i.fas + i.fas {
  display: none !important;
}


.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.info-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.info-value {
  font-size: 0.875rem;
  color: #111827;
  font-weight: 500;
}

.progress-bar {
  height: 6px;
  background-color: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #4f46e5;
  border-radius: 3px;
}

.permission-message {
  display: none;
  padding: 1rem;
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  margin-bottom: 1rem;
  border-radius: 0.375rem;
}

.permission-message.error {
  background-color: #fee2e2;
  border-left-color: #ef4444;
}

.permission-message.success {
  background-color: #ecfdf5;
  border-left-color: #10b981;
}

.navbar {
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo {
  font-weight: 700;
  color: #4f46e5;
  font-size: 1.25rem;
}

.navbar-nav .nav-link {
    color: #4b5563;
    font-weight: 400;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link.active {
    color: #4f46e5;
}

.nav-link:hover {
  color: #4f46e5;
}

.navbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 32px;
}

.nav-test-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  color: #4f46e5;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-test-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.nav-test-icon:hover {
  color: #4f46e5;
  opacity: 0.85;
  transform: translateY(-1px);
}

.navbar-toggler {
  margin-left: auto;
  border: 0;
  padding: 6px 8px;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-collapse-custom {
  position: absolute;
  top: 100%;
  right: 0;
  width: 260px;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  flex-grow: 0;
  visibility: unset !important;
}

.navbar-collapse-custom .navbar-nav {
  flex-direction: column;
}

.navbar-collapse-custom .nav-link {
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 500;
}

.navbar-collapse-custom .nav-link:hover {
  background: #f4f4ff;
}

.cookie-alert {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #1f2937;
  color: white;
  padding: 1rem;
  z-index: 50;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.cookie-alert.show {
  transform: translateY(0);
}

/* === BLOCO DE PRODUTOS AMAZON - ESTILO IGUAL AO EXEMPLO === */

.product-card {
  /* border: 1px solid #e0e0e0; */
  border: none;
  /* border-radius: 8px;
  background-color: #fff; */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.product-image {
  max-width: 100%;
  height: 120px;
  object-fit: contain;
  margin-top: 10px;
}

.discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: #d93025;
  color: #fff;
  font-size: 0.75em;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  z-index: 2;
}

.product-title {
  font-size: 1em;
  color: #000;
  min-height: 45px;
  margin-bottom: 8px;
}

.product-title a {
  text-decoration: none;
  color: inherit;
}

.product-title a:hover {
  text-decoration: underline;
}

.product-prices {
  font-size: 0.9em;
  line-height: 1.2em;
}

.price-now {
  color: var(--price-text);
}

.card-footer {
  background-color: var(--card-footer-bg) !important;
  color: var(--card-footer-text) !important;
}

.btn-review, .btn-amz {
  text-decoration: none;
  padding: 5px 0px;
  color: var(--text-color);
  border: none;
  font-size: 0.95em;
}

.btn-review:hover, .btn-amz:hover {
  text-decoration: none;
  font-weight: 600;
}

.market-icon {
  width: 30px;
  height: 30px;
  transition: transform .2s ease;
}

.market-icon:hover {
  transform: scale(1.15);
}

.market-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20,20,20,0.6);
  display: flex;
  text-align: center;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.market-modal-content {
  background: white;
  padding: 20px;
  width: 260px;
  border-radius: 10px;
  text-align: center;
  animation: fadeIn .25s ease-out;
  box-shadow: 0 4px 18px rgba(0,0,0,0.2);
}

.market-option-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  color: #333;
  background: #fafafa;
}

.market-option-btn:hover {
  background: #f0f0f0;
}

.market-option-btn img {
  width: 24px;
  height: 24px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-product-img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 80%;
  max-height: 90px;
  object-fit: contain;
}

.modal-product-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  max-width: 220px;
  margin: 0 auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;       /* <-- DUAS LINHAS */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  min-height: 2.5em;           /* mantém altura consistente */
}


footer {
  font-size: 0.85em;
  background-color: rgb(243 244 246);
  text-align: center;
  color: rgb(107 114 128);
  margin-top: 100px;
  padding: 15px 0;
}

footer .nav {
  margin-bottom: 20px;
}

footer .nav-item a {
  color: rgb(107 114 128);
  text-decoration: none;
  font-size: 1em;
}

footer .nav-item a:hover {
  color: rgb(67 56 202);
  text-decoration: underline;
}

footer a {
  color: rgb(67 56 202);
  text-decoration: underline;
}

footer a:hover {
  color: rgb(67 56 202);
  text-decoration: underline;
}

footer .links-sites {
  text-align: center;
  font-size: 1em;
  font-weight: 600;
  line-height: 200%;
  color: rgb(67 56 202);
}

footer .links-sites h5 {
  margin-top: 10px;
  font-size: 1.2em;
  color: rgb(107 114 128);
}

footer .donate {
  font-size: .95em;
}

footer .donate img {
  width: 100px;
  display: block;
  margin: 10px auto;
}

footer .donate h5 {
  margin-top: 10px;
  font-size: 1.3em;
}



/* Botões e câmera responsivos */
@media (max-width: 640px) {
  .btn-primary, .btn-secondary {
    font-size: 0.90rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    min-width: 98px;
  }
  #startCamera, #stopCamera {
    flex: 1 1 40%;
    max-width: 48vw;
  }
  .camera-feed {
    max-height: 46vw;
    min-height: 170px;
    object-fit: contain;
  }
  #capturePhoto {
    position: absolute !important;
    bottom: 8px !important;
    right: 12px !important;
    z-index: 20;
    padding: 0.75rem;
    border-radius: 9999px;
    font-size: 1.5rem;
    min-width: 0;
    min-height: 0;
  }
  #capturePhoto span {
    display: none;
  }
  #settingsToggle {
    position: absolute !important;
    bottom: 8px !important;
    left: 12px !important;
    z-index: 20;
    padding: 0.75rem;
    border-radius: 9999px;
    font-size: 1.5rem;
    min-width: 0;
    min-height: 0;
  }
  #settingsToggle span {
    display: none;
  }
  .camera-container {
    position: relative;
  }
  .info-card {
    font-size: 0.98rem;
  }
  .camera-feed {
    width: 100%;
    height: auto;
    max-width: 100vw;
    object-fit: contain;
    background: #111;
  }
  
  /* Caixa de configuração máxima de 480px mas expande em telas pequenas */
  #cameraSettingsBox {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 641px) {
  #settingsToggle {
    position: absolute !important;
    bottom: 16px !important;
    left: 16px !important;
    z-index: 20;
    padding: 0.7rem 1.2rem;
    border-radius: 1.5rem;
    font-size: 1rem;
  }
  #settingsToggle span {
    display: inline-block !important;
    margin-left: 0.5rem;
  }
  #cameraSettingsBox {
    max-width: 98vw;
    border-radius: 0.6rem;
    padding: 0.5rem 0.4rem;
    min-width: 0 !important;
  }
  
  /* Evita shadow sobre vídeo */
  .camera-container {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  #capturePhoto span {
    display: inline-block;
    margin-left: 0.5rem;
  }
}


/* =========================================================
   SEÇÃO SEO - Como funciona
   ========================================================= */

#seo-content-block {
  background-color: #ffffff;
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

#seo-content-block h2 {
  font-size: 1.3rem;
  color: #4f46e5;
  border-bottom: 2px solid rgba(79, 70, 229, 0.15);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

#seo-content-block h3 {
  font-size: 1.05rem;
  color: #4f46e5;
  padding-left: 12px;
  border-left: 3px solid #4f46e5;
  margin-top: 28px;
  margin-bottom: 12px;
}

#seo-content-block p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #374151;
}

#seo-content-block strong {
  color: #4f46e5;
  font-weight: 600;
}

/* =========================================================
   SEÇÃO FAQ - Perguntas Frequentes
   ========================================================= */

#faq-section {
  background-color: #ffffff;
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

#faq-section > h2 {
  font-size: 1.3rem;
  color: #4f46e5;
  border-bottom: 2px solid rgba(79, 70, 229, 0.15);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

#faq-section .faq-item {
  background-color: rgba(79, 70, 229, 0.03);
  border: 1px solid rgba(79, 70, 229, 0.08);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#faq-section .faq-item:hover {
  border-color: rgba(79, 70, 229, 0.25);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

#faq-section .faq-item h3 {
  font-size: 0.95rem;
  color: #4f46e5;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

#faq-section .faq-item h3::before {
  content: "\f059";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.85rem;
  color: #4f46e5;
  flex-shrink: 0;
  margin-top: 2px;
}

#faq-section .faq-item p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 0;
  padding-left: 24px;
}

/* Responsivo - SEO e FAQ */
@media (max-width: 768px) {
  #seo-content-block,
  #faq-section {
    padding: 20px 16px;
    border-radius: 10px;
  }

  #seo-content-block h3 {
    font-size: 1rem;
    margin-top: 22px;
  }

  #faq-section .faq-item {
    padding: 14px 16px;
  }

  #faq-section .faq-item p {
    padding-left: 0;
  }
}

/* =========================================================
   Bloco de Recomendações pós-teste
   ========================================================= */

#speed-recommendations #seo-content-block {
  background-color: #ffffff;
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

#speed-recommendations #seo-content-block h2 {
  font-size: 1.3rem;
  color: #4f46e5;
  border-bottom: 2px solid rgba(79, 70, 229, 0.15);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  #speed-recommendations #seo-content-block {
    padding: 20px 16px;
    border-radius: 10px;
  }

  #speed-recommendations .rec-item {
    gap: 8px;
    padding: 8px 10px;
  }
}
