/* Root variables for styling */
:root {
  --bg-primary: #0b0c0e;
  --bg-secondary: #131518;
  --bg-tertiary: #1b1e22;
  
  --color-strava: #FC4C02;
  --color-strava-hover: #e34402;
  --color-text-primary: #ffffff;
  --color-text-secondary: #9aa0a6;
  --color-border: rgba(255, 255, 255, 0.08);
  
  --tier-pro-gradient: linear-gradient(135deg, #FFE000 0%, #799F0C 100%);
  --tier-pro-glow: rgba(255, 224, 0, 0.2);
  
  --tier-excellent-gradient: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
  --tier-excellent-glow: rgba(0, 198, 255, 0.2);
  
  --tier-strong-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --tier-strong-glow: rgba(56, 239, 125, 0.2);
  
  --transition-speed: 0.3s;
}

/* Reset and Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Decorative Background Blobs */
.background-decor-1 {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(252, 76, 2, 0.08) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
}

.background-decor-2 {
  position: absolute;
  bottom: 10%;
  left: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 198, 255, 0.05) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  flex-grow: 1;
  width: 100%;
}

/* Header Section */
.header {
  text-align: center;
  margin-bottom: 50px;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--color-strava);
  margin-bottom: 15px;
}

.header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 15px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--color-text-secondary);
  font-size: 18px;
  max-width: 650px;
  margin: 0 auto 20px auto;
  font-weight: 300;
}

.event-period {
  display: inline-block;
  background: rgba(252, 76, 2, 0.1);
  border: 1px solid rgba(252, 76, 2, 0.3);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-strava);
}

/* Tiers Grid & Cards */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.tier-card {
  background: var(--bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tier-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.badge-icon {
  font-size: 40px;
  margin-bottom: 15px;
}

.tier-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.elevation-range {
  font-size: 28px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 15px;
}

.tier-card p {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.reward-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
}

/* Custom styles per tier card border glow on hover */
.tier-pro:hover {
  box-shadow: 0 10px 30px var(--tier-pro-glow);
  border-color: #FFE000;
}
.tier-pro .elevation-range {
  background: var(--tier-pro-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tier-excellent:hover {
  box-shadow: 0 10px 30px var(--tier-excellent-glow);
  border-color: #00C6FF;
}
.tier-excellent .elevation-range {
  background: var(--tier-excellent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tier-strong:hover {
  box-shadow: 0 10px 30px var(--tier-strong-glow);
  border-color: #38ef7d;
}
.tier-strong .elevation-range {
  background: var(--tier-strong-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Console Card (OAuth action console) */
.console-card {
  background: rgba(23, 25, 28, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 40px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Hall of Fame Preview */
.hall-preview-section {
  background: var(--bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 30px 35px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}
.hall-preview-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #FFE000, #FC4C02, #00C6FF, #38ef7d);
}
.hall-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.hall-header-img {
  width: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}
/* Sponsors Strip */
.sponsors-strip {
  width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 10px 0;
  position: relative;
}
.sponsors-track {
  display: flex;
  align-items: center;
  gap: 50px;
  width: max-content;
  animation: scroll-sponsors 20s linear infinite;
}
.sponsor-logo {
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  filter: grayscale(100%);
  transition: all 0.3s;
  flex-shrink: 0;
}
.sponsor-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}
@keyframes scroll-sponsors {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 25px)); }
}
.hall-view-all {
  color: var(--color-strava);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}
.hall-view-all:hover { color: #ff6a33; }
.hall-preview-desc {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}
.hall-count-num {
  color: var(--color-strava);
  font-weight: 800;
  font-size: 18px;
}
.hall-view-more-container {
  text-align: center;
  margin-top: 16px;
}
.hall-view-more-btn {
  display: inline-block;
  color: var(--color-strava);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  padding: 8px 16px;
  border: 1px solid var(--color-strava);
  border-radius: 20px;
}
.hall-view-more-btn:hover {
  background: var(--color-strava);
  color: #fff;
}
.hall-preview-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hall-preview-item {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 14px;
  animation: fadeInUp 0.4s ease-out both;
}
.hall-preview-item:nth-child(1) { animation-delay: 0.05s; }
.hall-preview-item:nth-child(2) { animation-delay: 0.1s; }
.hall-preview-item:nth-child(3) { animation-delay: 0.15s; }
.hall-preview-item:nth-child(4) { animation-delay: 0.2s; }
.hall-preview-item:nth-child(5) { animation-delay: 0.25s; }
.hall-preview-item:nth-child(6) { animation-delay: 0.3s; }
.hall-preview-item:nth-child(7) { animation-delay: 0.35s; }
.hall-preview-item:nth-child(8) { animation-delay: 0.4s; }
.hall-preview-item:nth-child(9) { animation-delay: 0.45s; }
.hall-preview-item:nth-child(10) { animation-delay: 0.5s; }
.hpi-rank { text-align: center; font-size: 18px; }
.hpi-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hpi-tier { font-size: 12px; font-weight: 700; white-space: nowrap; }
.hpi-elev { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 16px; color: var(--color-strava); text-align: right; }

.console-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  margin-bottom: 10px;
}

.console-desc {
  color: var(--color-text-secondary);
  font-size: 15px;
  margin-bottom: 16px;
}
.once-notice {
  background: rgba(240, 165, 0, 0.1);
  border: 1px solid rgba(240, 165, 0, 0.4);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #f0a500;
  text-align: center;
  margin-bottom: 28px;
}

/* Status Indicator Dot */
.status-indicator {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 25px;
  display: inline-block;
  padding: 5px 12px;
  border-radius: 12px;
}

.status-offline {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.08);
}

.status-online {
  color: #34c759;
  background: rgba(52, 199, 89, 0.08);
}

/* Buttons */
.btn-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.btn {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: background-color var(--transition-speed), transform 0.1s, box-shadow var(--transition-speed);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--color-strava);
  color: var(--color-text-primary);
}

.btn-primary:hover {
  background-color: var(--color-strava-hover);
  box-shadow: 0 0 20px rgba(252, 76, 2, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
}

.btn-accent {
  background-color: #34c759;
  color: var(--color-text-primary);
}

.btn-accent:hover {
  background-color: #28a745;
  box-shadow: 0 0 20px rgba(40, 167, 69, 0.4);
}

/* Strava Icon SVG */
.strava-svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* How-to instructions block */
.how-to {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px 25px;
  margin-bottom: 25px;
  text-align: left;
}

.how-to-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.how-to-steps {
  padding-left: 18px;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.9;
}

.how-to-steps code {
  background: rgba(255,255,255,0.06);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 12px;
  color: #a8d8ff;
  font-family: 'Courier New', monospace;
}

/* URL Input Group */
.url-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.url-input {
  flex: 1;
  min-width: 260px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 13px 18px;
  color: var(--color-text-primary);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.url-input:focus {
  border-color: var(--color-strava);
  box-shadow: 0 0 0 3px rgba(252, 76, 2, 0.12);
}

.url-input.input-error {
  border-color: #ff3b30;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.btn-verify {
  white-space: nowrap;
}

.privacy-note {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 25px;
  opacity: 0.7;
}

/* Mock Console section */
.mock-console {
  border-top: 1px solid var(--color-border);
  padding-top: 30px;
  text-align: left;
  margin-top: 30px;
}

.mock-header {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 15px;
  font-weight: 600;
}

.mock-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.select-field {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 10px 15px;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
  flex-grow: 1;
}

.select-field:focus { border-color: var(--color-strava); }

/* ── Form Elements ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
  text-align: left;
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-align: left;
}

.required { color: var(--color-strava); }

.form-input {
  background: var(--bg-tertiary);
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 15px;
  color: var(--color-text-primary);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
  width: 100%;
}

.form-input:focus {
  border-color: var(--color-strava);
  box-shadow: 0 0 0 3px rgba(252, 76, 2, 0.12);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.5);
  cursor: pointer;
}

/* ── PRO time section ── */
.pro-time-section {
  background: rgba(255, 224, 0, 0.04);
  border: 1px solid rgba(255, 224, 0, 0.25);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 18px;
  text-align: left;
}

.pro-time-notice {
  font-size: 13px;
  color: #ffe000;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── Elapsed time display ── */
.elapsed-display {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}

.elapsed-warn {
  color: #ff3b30;
  font-size: 13px;
  margin-left: 10px;
}

/* ── Upload area ── */
.upload-group { margin-bottom: 25px; text-align: left; }

.upload-area {
  border: 2px dashed var(--color-border);
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-speed), background var(--transition-speed);
  position: relative;
  overflow: hidden;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area:hover, .upload-area.drag-over {
  border-color: var(--color-strava);
  background: rgba(252, 76, 2, 0.04);
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.upload-placeholder { pointer-events: none; }
.upload-icon { font-size: 36px; margin-bottom: 10px; }
.upload-text { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.upload-hint { font-size: 12px; color: var(--color-text-secondary); }

.preview-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.preview-img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid var(--color-border);
}

.remove-img-btn {
  background: rgba(255, 59, 48, 0.12);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #ff6b6b;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition-speed);
  position: relative;
  z-index: 3;
}

.remove-img-btn:hover { background: rgba(255, 59, 48, 0.22); }

/* ── Submit button ── */
.btn-submit {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  border-radius: 12px;
  margin-top: 8px;
  letter-spacing: 0.3px;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* How-to grid */
.how-to-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.how-to-item {
  font-size: 13px;
  color: var(--color-text-secondary);
  padding: 6px 0;
}

@media (max-width: 480px) {
  .how-to-grid { grid-template-columns: 1fr; }
}

/* Result Card */
.result-card {
  background: var(--bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 35px;
  margin-top: 30px;
  animation: slideIn 0.4s ease-out;
}

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

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 15px;
}

.result-header h3 { font-family: 'Outfit', sans-serif; font-size: 22px; }

.result-badge-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pro      { background: var(--tier-pro-gradient);       color: #000; }
.badge-excellent{ background: var(--tier-excellent-gradient); color: #fff; }
.badge-strong   { background: var(--tier-strong-gradient);    color: #fff; }
.badge-none     { background: #3a3f46; color: var(--color-text-secondary); }
.badge-review   { background: linear-gradient(135deg,#f0a500,#f8c344); color: #000; }

.result-details { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; }

.detail-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding-bottom: 10px;
  font-size: 15px;
}

.detail-label { color: var(--color-text-secondary); }
.detail-val { font-weight: 600; }
.highlight-val { color: var(--color-strava); font-size: 18px; font-weight: 800; }

.result-message-box { border-radius: 12px; padding: 20px; font-size: 15px; line-height: 1.6; }
.msg-success { background: rgba(52,199,89,0.08);  border: 1px solid rgba(52,199,89,0.3);  color: #58d68d; }
.msg-failed  { background: rgba(255,59,48,0.08);  border: 1px solid rgba(255,59,48,0.3);  color: #ff6b6b; }
.msg-review  { background: rgba(240,165,0,0.08);  border: 1px solid rgba(240,165,0,0.3);  color: #f8c344; }

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--color-text-secondary);
  font-size: 13px;
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
}

/* Certificate Card */
.certificate-card {
  margin-top: 30px;
  animation: fadeInUp 0.6s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cert-border {
  border: 3px solid;
  border-image: linear-gradient(135deg, #FFE000, #e6a817, #FFE000) 1;
  background: linear-gradient(145deg, #0d0f11, #151820);
  padding: 40px 30px;
  text-align: center;
  position: relative;
}
.cert-border::before,
.cert-border::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 224, 0, 0.3);
}
.cert-border::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.cert-border::after  { bottom: 10px; right: 10px; border-left: none; border-top: none; }
.cert-header {
  font-size: 13px;
  letter-spacing: 3px;
  color: #c4a34d;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cert-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #FFE000;
  margin-bottom: 20px;
  text-shadow: 0 0 30px rgba(255, 224, 0, 0.15);
}
.cert-tier {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  padding: 8px 24px;
  border-radius: 12px;
  display: inline-block;
}
.cert-tier-pro      { background: linear-gradient(135deg, rgba(255,224,0,0.15), rgba(121,159,12,0.15)); color: #FFE000; border: 1px solid rgba(255,224,0,0.3); }
.cert-tier-excellent { background: linear-gradient(135deg, rgba(0,198,255,0.15), rgba(0,114,255,0.15)); color: #00C6FF; border: 1px solid rgba(0,198,255,0.3); }
.cert-tier-strong    { background: linear-gradient(135deg, rgba(17,153,142,0.15), rgba(56,239,125,0.15)); color: #38ef7d; border: 1px solid rgba(56,239,125,0.3); }
.cert-details {
  margin: 20px 0;
  line-height: 2;
}
.cert-name {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}
.cert-stats {
  font-size: 16px;
  color: var(--color-text-secondary);
  letter-spacing: 1px;
}
.cert-date {
  font-size: 14px;
  color: var(--color-text-secondary);
}
.cert-number {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #c4a34d;
  margin: 20px 0 16px;
  letter-spacing: 2px;
}
.cert-footer {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  border-top: 1px solid rgba(255,224,0,0.15);
  padding-top: 16px;
}
.cert-footer small {
  color: #f0a500;
  font-weight: 600;
}
.cert-hall-action { text-align: center; margin-top: 16px; }
.btn-hall {
  background: linear-gradient(135deg, #FC4C02, #e34402);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(252, 76, 2, 0.3);
}
.btn-hall:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(252, 76, 2, 0.4); }
.hall-published-msg {
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  background: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.3);
  border-radius: 10px;
  font-size: 14px;
  color: #34c759;
  font-weight: 600;
}

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 600px) {
  .header h1 { font-size: 30px; }
  .console-card { padding: 20px; }
  .mock-controls { flex-direction: column; align-items: stretch; }
  .mock-controls button { width: 100%; }
  .result-header { flex-direction: column; gap: 12px; align-items: flex-start; }
}


.mock-header {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 15px;
  font-weight: 600;
}

.mock-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.mock-controls label {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.select-field {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 10px 15px;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
  flex-grow: 1;
  max-width: 100%;
}

.select-field:focus {
  border-color: var(--color-strava);
}

/* Result Card */
.result-card {
  background: var(--bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 35px;
  margin-top: 30px;
  animation: slideIn 0.4s ease-out;
}

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

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 15px;
}

.result-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
}

.result-badge-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Badge colors for results */
.badge-pro {
  background: var(--tier-pro-gradient);
  color: #000000;
}
.badge-excellent {
  background: var(--tier-excellent-gradient);
  color: #ffffff;
}
.badge-strong {
  background: var(--tier-strong-gradient);
  color: #ffffff;
}
.badge-none {
  background: #3a3f46;
  color: var(--color-text-secondary);
}

/* Result rows */
.result-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255, 0.03);
  padding-bottom: 10px;
  font-size: 15px;
}

.detail-label {
  color: var(--color-text-secondary);
}

.detail-val {
  font-weight: 600;
}

.highlight-val {
  color: var(--color-strava);
  font-size: 18px;
  font-weight: 800;
}

/* Result Message boxes */
.result-message-box {
  border-radius: 12px;
  padding: 20px;
  font-size: 15px;
  line-height: 1.6;
}

.msg-success {
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.3);
  color: #58d68d;
}

.msg-failed {
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #ff6b6b;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--color-text-secondary);
  font-size: 13px;
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
}

/* Hidden Utility */
.hidden {
  display: none !important;
}

/* Responsive adjustments */
@media(max-width: 600px) {
  .header h1 {
    font-size: 32px;
  }
  
  .console-card {
    padding: 20px;
  }
  
  .mock-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .mock-controls button {
    width: 100%;
  }

  .sponsors-track {
    gap: 30px;
  }
  .sponsor-logo {
    height: 30px;
  }

  /* Certificate Mobile Adjustments */
  .cert-border {
    padding: 24px 16px;
  }
  .cert-header {
    font-size: 11px;
    letter-spacing: 1px;
  }
  .cert-title {
    font-size: 26px;
    margin-bottom: 16px;
  }
  .cert-tier {
    font-size: 18px;
    padding: 6px 16px;
    margin-bottom: 16px;
  }
  .cert-name {
    font-size: 20px;
  }
  .cert-stats {
    font-size: 14px;
  }
  .cert-number {
    letter-spacing: 0px;
    font-size: 12px;
    margin: 16px 0 12px;
  }
  .cert-footer {
    font-size: 12px;
  }

  .hall-preview-item {
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    padding: 12px;
  }
  .hpi-rank {
    grid-row: 1 / span 2;
  }
  .hpi-name {
    grid-column: 2;
    grid-row: 1;
    font-weight: 700;
  }
  .hpi-tier {
    grid-column: 2;
    grid-row: 2;
    font-size: 12px;
  }
  .hpi-elev {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    font-size: 14px;
  }
}

/* ═══════════════════════════════════════════════════════════
   Iframe Mode – Light Theme for Shopline Integration
   ═══════════════════════════════════════════════════════════ */
body.iframe-mode {
  background: transparent !important;
  color: #1a1a1a !important;
}

/* Hide dark-mode decorations, header, footer, tiers in iframe */
body.iframe-mode .background-decor-1,
body.iframe-mode .background-decor-2,
body.iframe-mode .header,
body.iframe-mode .footer,
body.iframe-mode .tiers-grid {
  display: none !important;
}
body.iframe-mode .container {
  padding-top: 10px;
}

/* ── Tier Cards ── */
body.iframe-mode .tier-card {
  background: #f8f8f8;
  border-color: #e0e0e0;
  color: #1a1a1a;
}
body.iframe-mode .tier-card:hover {
  border-color: #ccc;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
body.iframe-mode .tier-card h3 {
  color: #1a1a1a;
}
body.iframe-mode .tier-card p {
  color: #666;
}
body.iframe-mode .reward-tag {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
  color: #444;
}

/* ── Console Card (Form Area) ── */
body.iframe-mode .console-card {
  background: #FAF6F1;
  border: 1.5px solid #C4A882;
  border-radius: 12px;
  box-shadow: none;
  color: #1a1a1a;
}
body.iframe-mode .console-card h2 {
  color: #5C4A2A;
}
body.iframe-mode .console-desc {
  color: #666;
}

/* ── Once Notice ── */
body.iframe-mode .once-notice {
  background: rgba(196, 168, 130, 0.1);
  border-color: #C4A882;
  color: #8B6914;
}

/* ── Form Inputs ── */
body.iframe-mode .form-label {
  color: #555;
}
body.iframe-mode .form-input,
body.iframe-mode .url-input,
body.iframe-mode .select-field {
  background: #f5f5f5;
  border-color: #ddd;
  color: #1a1a1a;
}
body.iframe-mode .form-input:focus,
body.iframe-mode .url-input:focus,
body.iframe-mode .select-field:focus {
  border-color: var(--color-strava);
  box-shadow: 0 0 0 3px rgba(252, 76, 2, 0.1);
}
body.iframe-mode .form-input::placeholder,
body.iframe-mode .url-input::placeholder {
  color: #aaa;
}

/* Date/time picker icons (dark by default, keep dark in light mode) */
body.iframe-mode input[type="date"]::-webkit-calendar-picker-indicator,
body.iframe-mode input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
}

/* ── How-to Section ── */
body.iframe-mode .how-to {
  background: #f9f9f9;
  border-color: #e0e0e0;
}
body.iframe-mode .how-to-title {
  color: #555;
}
body.iframe-mode .how-to-item {
  color: #555;
}
body.iframe-mode .how-to-steps {
  color: #555;
}
body.iframe-mode .how-to-steps code {
  background: rgba(0,0,0,0.06);
  color: #0072FF;
}

/* ── Upload Area ── */
body.iframe-mode .upload-area {
  border-color: #d0d0d0;
  background: #fafafa;
}
body.iframe-mode .upload-area:hover,
body.iframe-mode .upload-area.drag-over {
  border-color: var(--color-strava);
  background: rgba(252, 76, 2, 0.03);
}
body.iframe-mode .upload-text {
  color: #333;
}
body.iframe-mode .upload-hint {
  color: #888;
}
body.iframe-mode .preview-img {
  border-color: #ddd;
}

/* ── PRO Time Section ── */
body.iframe-mode .pro-time-section {
  background: rgba(255, 224, 0, 0.06);
  border-color: rgba(200, 170, 0, 0.3);
}
body.iframe-mode .pro-time-notice {
  color: #b87a00;
}

/* ── Elapsed display ── */
body.iframe-mode .elapsed-display {
  background: #f5f5f5;
  color: #555;
}

/* ── Mock Console ── */
body.iframe-mode .mock-console {
  border-top-color: #e0e0e0;
}
body.iframe-mode .mock-header,
body.iframe-mode .mock-controls label {
  color: #666;
}

/* ── Result Card ── */
body.iframe-mode .result-card {
  background: #f8f8f8;
  border-color: #e0e0e0;
}
body.iframe-mode .result-header {
  border-bottom-color: #e0e0e0;
}
body.iframe-mode .result-header h3 {
  color: #1a1a1a;
}
body.iframe-mode .detail-row {
  border-bottom-color: #eee;
}
body.iframe-mode .detail-label {
  color: #777;
}
body.iframe-mode .detail-val {
  color: #1a1a1a;
}
body.iframe-mode .msg-success {
  background: rgba(52,199,89,0.08);
  border-color: rgba(52,199,89,0.3);
  color: #1a8a3e;
}
body.iframe-mode .msg-failed {
  background: rgba(255,59,48,0.06);
  border-color: rgba(255,59,48,0.25);
  color: #d32f2f;
}
body.iframe-mode .msg-review {
  background: rgba(240,165,0,0.06);
  border-color: rgba(240,165,0,0.25);
  color: #b87a00;
}

/* ── Certificate Card ── */
body.iframe-mode .cert-border {
  background: linear-gradient(145deg, #fdfcf7, #f5f3ea);
  border-image: linear-gradient(135deg, #c4a34d, #8a6914, #c4a34d) 1;
}
body.iframe-mode .cert-border::before,
body.iframe-mode .cert-border::after {
  border-color: rgba(180, 150, 60, 0.3);
}
body.iframe-mode .cert-title {
  color: #b8860b;
  text-shadow: none;
}
body.iframe-mode .cert-header {
  color: #8a6914;
}
body.iframe-mode .cert-name {
  color: #1a1a1a;
}
body.iframe-mode .cert-stats {
  color: #555;
}
body.iframe-mode .cert-date {
  color: #777;
}
body.iframe-mode .cert-number {
  color: #8a6914;
}
body.iframe-mode .cert-footer {
  border-top-color: rgba(180, 150, 60, 0.2);
  color: #666;
}
body.iframe-mode .cert-footer small {
  color: #b87a00;
}

body.iframe-mode .hall-preview-section {
  background: #FDF9F4;
  border: 1px solid #E8DCCA;
  border-radius: 12px;
}
body.iframe-mode .hall-preview-section::before {
  display: none;
}
body.iframe-mode .hall-preview-header h2 {
  display: none;
}
body.iframe-mode .hall-header-img {
  width: 100%;
  display: block;
  margin: 0 auto 10px auto;
  border-radius: 8px;
}
body.iframe-mode .hall-preview-desc {
  color: #8B7355;
}
body.iframe-mode .hall-preview-item {
  background: #ffffff;
  border-color: #e0d5c5;
}
body.iframe-mode .hall-preview-item .hpi-tier {
  color: #8B6914 !important;
}
body.iframe-mode .hpi-name {
  color: #1a1a1a;
}
body.iframe-mode .hall-published-msg {
  background: rgba(52, 199, 89, 0.08);
  border-color: rgba(52, 199, 89, 0.25);
  color: #1a8a3e;
}

/* ── Status indicator ── */
body.iframe-mode .status-offline {
  color: #d32f2f;
  background: rgba(255, 59, 48, 0.06);
}
body.iframe-mode .status-online {
  color: #1a8a3e;
  background: rgba(52, 199, 89, 0.06);
}

/* ── Privacy note ── */
body.iframe-mode .privacy-note {
  color: #999;
}

/* ── Hide original tier cards in iframe (replaced by info section) ── */
body.iframe-mode .tiers-grid {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   Iframe Info Section (Shopline-only content)
   ═══════════════════════════════════════════════════════════ */
.iframe-info-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 32px 28px;
  margin-bottom: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.iframe-info-period {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-strava);
  background: rgba(252, 76, 2, 0.06);
  border: 1px solid rgba(252, 76, 2, 0.2);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 24px;
  text-align: center;
}

.iframe-info-story {
  margin-bottom: 24px;
  line-height: 1.9;
  font-size: 15px;
  color: #444;
}
.iframe-info-story p {
  margin-bottom: 10px;
}
.iframe-info-story strong {
  color: #1a1a1a;
}

.iframe-info-method {
  margin-bottom: 24px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 1px solid #eee;
}
.iframe-info-method h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
}
.iframe-info-method p {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}

.iframe-info-prizes {
  margin-bottom: 24px;
}
.iframe-info-prizes h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
}

.iframe-prize-item {
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  border: 1px solid;
}
.prize-strong {
  background: rgba(56, 239, 125, 0.05);
  border-color: rgba(56, 239, 125, 0.25);
}
.prize-excellent {
  background: rgba(0, 198, 255, 0.05);
  border-color: rgba(0, 198, 255, 0.25);
}
.prize-pro {
  background: rgba(255, 224, 0, 0.06);
  border-color: rgba(255, 224, 0, 0.3);
}

.prize-tier-label {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}
.prize-strong .prize-tier-label { color: #11998e; }
.prize-excellent .prize-tier-label { color: #0072FF; }
.prize-pro .prize-tier-label { color: #b8860b; }

.prize-tier-range {
  font-size: 13px;
  color: #777;
  margin-bottom: 8px;
}
.prize-tier-reward {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.iframe-info-notes {
  padding-top: 16px;
  border-top: 1px solid #eee;
}
.iframe-info-notes p {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}

