/* CSS Variables for design tokens */
:root {
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Courier, monospace;

  /* Colors */
  --bg-dark: #09090e;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);

  /* Status Colors */
  --color-pass: #10b981;
  --color-pass-glow: rgba(16, 185, 129, 0.2);
  --color-fail: #ef4444;
  --color-fail-glow: rgba(239, 68, 68, 0.2);
  --color-warn: #f59e0b;
  --color-warn-glow: rgba(245, 158, 11, 0.2);
  --color-neutral: #6b7280;
  --color-neutral-glow: rgba(107, 114, 128, 0.2);

  /* Glassmorphism */
  --glass-bg: rgba(18, 18, 29, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: rgba(0, 0, 0, 0.35);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Ambient Background Glows */
.bg-glow-1 {
  position: fixed;
  width: 50vw;
  height: 50vh;
  top: -10vh;
  left: -10vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}

.bg-glow-2 {
  position: fixed;
  width: 50vw;
  height: 50vh;
  bottom: -10vh;
  right: -10vw;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}

.container {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 1;
}

/* Header Styles */
header {
  text-align: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.logo .icon {
  font-size: 2rem;
  background: linear-gradient(135deg, #a78bfa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(129, 140, 248, 0.5));
}

.brand-logo-img {
  height: 42px;
  width: 42px;
  border-radius: 10px;
  filter: drop-shadow(0 2px 10px rgba(129, 140, 248, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

.logo h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #ffffff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo h1 span {
  font-weight: 400;
  color: var(--primary);
  -webkit-text-fill-color: initial;
  background: none;
  margin-left: 0.2rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto;
}

/* Glass Container */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 50px var(--glass-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.description {
  color: var(--text-muted);
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 650px;
  margin: 0 auto 1.5rem auto;
}

.actions {
  display: flex;
  justify-content: center;
}

/* Premium Button */
.btn {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Address Card Display */
.address-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.5rem;
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.address-card {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.address-card .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.address-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.address-box span {
  font-size: 1.15rem;
  color: #e0e7ff;
  font-weight: 500;
  word-break: break-all;
}

.mono {
  font-family: var(--font-mono);
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, transform 0.1s;
  padding: 0.25rem;
}

.copy-btn:hover {
  color: #ffffff;
  transform: scale(1.05);
}

.copy-btn:active {
  transform: scale(0.95);
}

.copied-tooltip {
  position: absolute;
  bottom: -35px;
  background: rgba(99, 102, 241, 0.9);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.2s ease;
  z-index: 10;
}

.copied-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* Loader Styles */
.pulse-loader-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(99, 102, 241, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.loader-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  animation: pulseText 2s infinite ease-in-out;
}

.timer {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary);
}

/* Divider line */
.divider {
  height: 1px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.08) 80%, rgba(255, 255, 255, 0));
}

/* Report Section Styles */
.report-section {
  animation: fadeIn 0.5s ease-in-out;
}

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

.report-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  background: linear-gradient(to right, #ffffff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.email-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 1.5rem;
}

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-val {
  font-size: 0.95rem;
  color: #f3f4f6;
  word-break: break-all;
}

.font-semibold {
  font-weight: 600;
}

/* Status Cards Grid */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.status-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  top: -75px;
  right: -75px;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  pointer-events: none;
  transition: all 0.3s ease;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.card-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-comment-box {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.01);
}

.comment-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.comment-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e0e7ff;
  word-break: break-all;
  white-space: pre-wrap;
  max-height: 150px;
  overflow-y: auto;
}

/* Card States */
/* PASS state */
.status-card.pass {
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.05);
}
.status-card.pass .card-glow {
  background: radial-gradient(circle, var(--color-pass-glow) 0%, rgba(0,0,0,0) 70%);
}
.status-card.pass .badge {
  background: var(--color-pass-glow);
  color: var(--color-pass);
}

/* FAIL state */
.status-card.fail {
  border-color: rgba(239, 68, 68, 0.25);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.05);
}
.status-card.fail .card-glow {
  background: radial-gradient(circle, var(--color-fail-glow) 0%, rgba(0,0,0,0) 70%);
}
.status-card.fail .badge {
  background: var(--color-fail-glow);
  color: var(--color-fail);
}

/* WARNING / NEUTRAL states */
.status-card.warning, .status-card.neutral {
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.05);
}
.status-card.warning .card-glow, .status-card.neutral .card-glow {
  background: radial-gradient(circle, var(--color-warn-glow) 0%, rgba(0,0,0,0) 70%);
}
.status-card.warning .badge, .status-card.neutral .badge {
  background: var(--color-warn-glow);
  color: var(--color-warn);
}

/* Accordion Headers Controls */
.extra-details-container {
  width: 100%;
}

.accordion-toggle {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #ffffff;
  padding: 1.15rem 1.5rem;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.accordion-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.accordion-toggle .chevron {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
}

.accordion-toggle.active .chevron {
  transform: rotate(180deg);
  color: #ffffff;
}

.accordion-content {
  margin-top: 0.75rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.headers-pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.5;
  max-height: 400px;
  overflow-y: auto;
}

/* Footer Style */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  opacity: 0.8;
  font-weight: 300;
}

footer code {
  color: var(--primary);
  font-family: var(--font-mono);
}

.copyright {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Keyframes & Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulseText {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-delayed {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hidden {
  display: none !important;
}

/* Reset / Generate new address styling */
.reset-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.reset-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.reset-btn:hover {
  color: var(--primary);
}

/* Report sharing styles */
.report-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.share-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Reports tab selector styling */
.reports-tabs-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
  width: 100%;
}

.tabs-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.reports-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}

.tab-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-pill.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-pill .tab-time {
  font-size: 0.75rem;
  opacity: 0.75;
}


