/* Shared styles for all pages to ensure consistent layout */



/* Prevent layout shift/flicker on load */
html, body {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}
html.loaded, body.loaded {
  opacity: 1;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 80px 0 0 0;
  background: #000000;
  min-height: 100vh;
  color: #e0e0e0;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.header-controls {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(247, 147, 26, 0.1);
}

.app-title {
  color: white;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

.header-controls.center-only {
  justify-content: flex-end;
}

.header, .header-section {
  text-align: center;
  padding: 80px 20px 40px 20px;
  margin-bottom: 30px;
}

.back-btn {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%),
    rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  color: #e8e8e8;
  text-decoration: none;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 16px;
  font-weight: 500;
  width: 36px;
  height: 36px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.back-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.back-btn:hover {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%),
    rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  color: #f5f5f5;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.back-btn:hover::before {
  opacity: 1;
}

.language-toggle {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%),
    rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  color: #e8e8e8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 12px;
  font-weight: 500;
  width: 36px;
  height: 36px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.language-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.language-toggle:hover {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%),
    rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  color: #f5f5f5;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.language-toggle:hover::before {
  opacity: 1;
}

.title {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.glass-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  backdrop-filter: blur(15px) saturate(1.2);
  -webkit-backdrop-filter: blur(15px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 
    0 4px 16px rgba(0,0,0,0.08),
    0 1px 2px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.content-section {
  max-width: 1200px;
  margin: 0 auto 25px auto;
  padding: 0 20px;
}

.input-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.input-field {
  width: 100%;
  max-width: 600px;
  min-width: 300px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px) saturate(1.2);
  -webkit-backdrop-filter: blur(15px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  color: #e0e0e0;
  font-size: 15px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 16px rgba(0,0,0,0.08),
    0 1px 2px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
  position: relative;
}

.input-field:focus {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 0 0 3px rgba(255, 255, 255, 0.1),
    0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px) scale(1.02);
}

.input-field::placeholder {
  color: #888;
  font-size: 15px;
}

.is-hidden {
  display: none;
}

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

.btn {
  --btn-text: #f5f5f5;
  --btn-pad: 8px 16px;
  --btn-font: 14px;
  --btn-radius: 999px;
  --btn-border: rgba(255, 255, 255, 0.15);
  --btn-bg: rgba(255, 255, 255, 0.06);
  --btn-bg-hover: rgba(255, 255, 255, 0.1);
  --btn-bg-active: rgba(255, 255, 255, 0.14);
  padding: var(--btn-pad);
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%),
    var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  border-radius: var(--btn-radius);
  font-size: var(--btn-font);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.1px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.btn:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(0);
  background: var(--btn-bg-active);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.btn:focus {
  outline: none;
  box-shadow: 
    0 0 0 2px rgba(255, 255, 255, 0.25),
    0 6px 16px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}


/* Responsive design */
@media (max-width: 768px) {
  body {
    padding: 70px 0 0 0;
  }
  
  .header-controls {
    padding: 15px 20px;
  }
  
  .app-title {
    font-size: 16px;
  }
  
  .language-toggle {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
  
  .title {
    font-size: 2rem;
  }
  .subtitle {
    font-size: 1rem;
  }
  .input-section {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  .input-field {
    min-width: unset;
    width: 100%;
    padding: 18px 22px;
    font-size: 16px;
  }
  .input-field::placeholder {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 65px 0 0 0;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .header-controls {
    padding: 12px 15px;
  }
  
  .app-title {
    font-size: 14px;
  }
  
  .language-toggle {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
  
  .header, .header-section {
    padding: 20px 10px 20px 10px;
  }
  .content-section {
    padding: 0 15px;
  }
}

/* ---- One Million ---- */

/* Page-specific styles for one-million */

.header-spacer {
  width: 36px;
  height: 36px;
}

.hero {
  text-align: center;
  padding: 42px 10px 22px 10px;
}

.hero .subtitle {
  margin-top: 10px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.progress-card {
  max-width: 820px;
  margin: 0 auto;
  padding: 26px;
}

.bar-shell {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.22);
}

.bar-tick {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 50%;
  width: 1px;
  background: rgba(247, 147, 26, 0.45);
  box-shadow: 0 0 18px rgba(247, 147, 26, 0.25);
}

.bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(247, 147, 26, 0.95) 0%, rgba(255, 200, 82, 0.95) 100%);
  box-shadow: 0 0 22px rgba(247, 147, 26, 0.25);
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bar-glow {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 999px;
  background: radial-gradient(circle at 100% 50%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 55%);
  mix-blend-mode: screen;
  opacity: 0.35;
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
  margin-top: 16px;
}

.progress-pct {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.refresh-btn {
  --btn-bg: rgba(247, 147, 26, 0.1);
  --btn-bg-hover: rgba(247, 147, 26, 0.18);
  --btn-bg-active: rgba(247, 147, 26, 0.22);
  --btn-border: rgba(247, 147, 26, 0.28);
  white-space: nowrap;
}

.meta-refresh {
  --btn-pad: 6px 14px;
  --btn-font: 13px;
}

.refresh-btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.meta-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 147, 26, 0.2);
}

.meta-link:hover {
  color: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(247, 147, 26, 0.45);
}

@media (max-width: 768px) {
  .hero {
    padding-top: 28px;
  }

  .progress-card {
    padding: 20px;
  }

  .progress-mini {
    align-items: center;
  }
}
