/* ==========================================================================
   DESKSCRIPT KEY VERIFIER & DOWNLOAD PORTAL
   Aesthetic: Frameless Obsidian Glass & Crisp Minimalist White Buttons
   Responsive Edge-to-Edge Layout & Anti-Inspection UI
   ========================================================================== */

:root {
  --bg-primary: #050608;
  --bg-card: rgba(13, 14, 18, 0.75);
  --bg-inner: rgba(255, 255, 255, 0.035);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: rgba(255, 255, 255, 0.25);
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-white: #ffffff;
  --accent-emerald: #10b981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);
  --accent-emerald-border: rgba(16, 185, 129, 0.25);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

/* Allow text selection only inside the key input */
input, textarea {
  user-select: text;
  -webkit-user-select: text;
}

/* Canvas Snowfall Background */
.snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  display: block;
}

/* Master Layout - Fullscreen Fluid */
.app-layout {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 36px;
}

/* Top Navigation Header - Always Pinned to Left & Right Edges */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: default;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.2));
}

.brand-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 6px;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 7px 15px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Centered Main Content Area */
.main-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  width: 100%;
}

/* Frameless Clean Glass Card */
.glass-card {
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: 26px;
  box-shadow: 0 35px 90px -25px rgba(0, 0, 0, 0.95);
  padding: 42px 40px;
  text-align: center;
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card.result-mode {
  max-width: 620px;
  text-align: left;
}

/* Neutral Monochrome Top Pill */
.card-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #e2e8f0;
  margin-bottom: 22px;
}

.pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* Typography */
.card-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 12px;
}

.highlight-text {
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-subtitle {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* Input Form */
.key-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 6px 10px 6px 14px;
  transition: all 0.25s ease;
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.input-icon {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  margin-right: 10px;
  flex-shrink: 0;
}

.key-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.05em;
  padding: 10px 0;
  min-width: 0;
}

.key-input::placeholder {
  color: #475569;
  font-size: 13px;
  letter-spacing: normal;
  font-family: var(--font-sans);
}

.paste-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.paste-btn:hover {
  background: #ffffff;
  color: #000000;
}

/* Crisp White Action Button (Pure White) */
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--accent-white);
  color: #000000;
  border: none;
  border-radius: 16px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.16);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.action-btn svg {
  stroke: #000000;
}

.action-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(255, 255, 255, 0.28);
}

.action-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.10);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Error message */
.input-error-msg {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 12px;
  margin-top: 14px;
  text-align: left;
}

/* Sub-card security note */
.card-footer-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 24px;
}

/* ==========================================================================
   STATE 2: VERIFICATION ANIMATION (Monochrome White Spinner)
   ========================================================================== */
.verifying-animation-box {
  margin: 12px 0 24px;
  display: flex;
  justify-content: center;
}

.ios-spinner {
  position: relative;
  width: 44px;
  height: 44px;
}

.spinner-blade {
  position: absolute;
  left: 20px;
  top: 0;
  width: 4px;
  height: 12px;
  background-color: #ffffff;
  border-radius: 3px;
  transform-origin: 2px 22px;
  animation: spinnerFade 1s linear infinite;
}

.spinner-blade:nth-child(1) { transform: rotate(0deg); animation-delay: -0.875s; }
.spinner-blade:nth-child(2) { transform: rotate(45deg); animation-delay: -0.75s; }
.spinner-blade:nth-child(3) { transform: rotate(90deg); animation-delay: -0.625s; }
.spinner-blade:nth-child(4) { transform: rotate(135deg); animation-delay: -0.5s; }
.spinner-blade:nth-child(5) { transform: rotate(180deg); animation-delay: -0.375s; }
.spinner-blade:nth-child(6) { transform: rotate(225deg); animation-delay: -0.25s; }
.spinner-blade:nth-child(7) { transform: rotate(270deg); animation-delay: -0.125s; }
.spinner-blade:nth-child(8) { transform: rotate(315deg); animation-delay: 0s; }

@keyframes spinnerFade {
  0% { opacity: 1; }
  100% { opacity: 0.15; }
}

.verification-title {
  font-size: 26px;
}

.steps-progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px 22px;
  margin-top: 10px;
  text-align: left;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.step-item.active {
  color: #ffffff;
}

.step-item.active .step-dot {
  background-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.step-item.done {
  color: var(--text-primary);
}

.step-item.done .step-dot {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

/* ==========================================================================
   STATE 3: RESULT & DOWNLOAD SHOWCASE
   ========================================================================== */
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.success-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 9999px;
}

.active-pill {
  background: var(--accent-emerald-bg);
  border: 1px solid var(--accent-emerald-border);
  color: #34d399;
}

.product-showcase {
  display: flex;
  gap: 24px;
  background: var(--bg-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 24px;
}

.product-media {
  width: 110px;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.product-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 18px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.meta-value {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  font-family: var(--font-sans);
}

.text-emerald {
  color: #34d399;
}

/* Download Button Card (Crisp White Button) */
.download-action-box {
  margin-bottom: 22px;
}

.download-btn {
  padding: 16px 24px;
  gap: 16px;
  border-radius: 18px;
  background: #ffffff;
  color: #000000;
}

.download-btn svg {
  stroke: #000000;
}

.download-btn-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.main-dl-text {
  font-size: 15px;
  font-weight: 700;
  color: #000000;
}

.sub-dl-text {
  font-size: 11px;
  color: #475569;
  font-weight: 500;
}

/* Quick Start Guide */
.guide-box {
  background: var(--bg-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.guide-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.guide-list {
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Result Reset Action */
.result-actions {
  display: flex;
  justify-content: center;
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.reset-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   BOTTOM BRANDING PILL (Bottom Right Edge)
   ========================================================================== */
.bottom-brand-badge {
  position: fixed;
  bottom: 24px;
  right: 36px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 16, 22, 0.75);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  padding: 8px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  user-select: none;
  pointer-events: auto;
  transition: all 0.25s ease;
}

.bottom-brand-badge:hover {
  background: rgba(18, 20, 28, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.badge-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.badge-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

.badge-highlight {
  color: #ffffff;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-layout {
    padding: 16px 20px;
  }
  .glass-card {
    padding: 30px 24px;
  }
  .card-title {
    font-size: 26px;
  }
  .product-showcase {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .product-media {
    width: 90px;
    height: 120px;
  }
  .meta-grid {
    grid-template-columns: 1fr;
  }
  .bottom-brand-badge {
    bottom: 16px;
    right: 20px;
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* ==========================================================================
   COOKIE & PRIVACY BAR (Full-Width Bottom Bar - Typical German/EU Website)
   ========================================================================== */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: rgba(8, 10, 14, 0.96);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  justify-content: center;
  animation: slideUpBar 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpBar {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookie-bar-container {
  max-width: 1300px;
  width: 100%;
  padding: 16px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.cookie-icon {
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.cookie-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cookie-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.cookie-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.cookie-btn-accept {
  background: #ffffff;
  color: #000000;
  border: none;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.18);
}

.cookie-btn-accept:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.cookie-btn-subtle {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-btn-subtle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

@media (max-width: 860px) {
  .cookie-bar-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 16px;
  }
  .cookie-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
