﻿@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@900&display=swap');

:root {
  --color-bg: #121212;
  --color-surface: #1a1a1a;
  --color-accent: #10b981;
  --color-text: #ffffff;
  --color-muted: #a1a1aa;
  --radius-lg: 20px;
  --shadow-elevated: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../website_bckgrnd.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  z-index: -2;
  filter: blur(8px);
}

/* Scrolling text banner */
.scrolling-banner {
  position: fixed;
  top: 140px;
  left: 0;
  width: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
  white-space: nowrap;
  filter: blur(8px);
}

.scrolling-banner-inner {
  display: inline-block;
  animation: scroll-left 30s linear infinite;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 900;
  font-family: 'Roboto Black', 'Roboto', var(--font-body);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.08);
  letter-spacing: 0.1em;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  width: 100%;
}

.card {
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.96), rgba(18, 18, 18, 0.92));
  padding: 40px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(18px);
}

.card--wide {
  max-width: 960px;
}

.card--result {
  max-width: 560px;
}

.card--hero {
  max-width: 640px;
}

h1 {
  margin-top: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  text-shadow: 0 10px 30px rgba(16, 185, 129, 0.35);
}

p.lead {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
  color: var(--color-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

form {
  display: grid;
  gap: 20px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

input, button, select, textarea {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(161, 161, 170, 0.2);
  background: rgba(26, 26, 26, 0.65);
  color: var(--color-text);
  font-size: 1rem;
  transition: border 0.2s ease, transform 0.2s ease;
}

input:focus, button:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

button {
  background: #10b981;
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

button:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.01);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.notice {
  background: rgba(16, 185, 129, 0.12);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--color-text);
}

.error {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.4);
}

.hidden {
  display: none !important;
}

.countdown {
  font-feature-settings: "tnum";
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  letter-spacing: 0.12em;
  color: var(--color-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.value-display {
  margin-top: 28px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(26, 26, 26, 0.7);
  border: 1px solid rgba(16, 185, 129, 0.25);
  word-break: break-word;
}

.table-card {
  margin-top: 28px;
  border-radius: 18px;
  background: rgba(26, 26, 26, 0.7);
  border: 1px solid rgba(161, 161, 170, 0.15);
}

.table-card header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(161, 161, 170, 0.1);
  font-weight: 600;
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card th,
.table-card td {
  padding: 16px 24px;
  text-align: left;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(161, 161, 170, 0.08);
}

.table-card tbody tr:hover {
  background: rgba(161, 161, 170, 0.08);
}

.table-hint {
  margin: 0;
  padding: 12px 24px 0;
  font-size: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  color: var(--color-muted);
}

.table-scroll {
  overflow-x: auto;
}

.table-scroll table {
  min-width: 720px;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: var(--color-text);
  font-size: clamp(0.75rem, 0.7rem + 0.3vw, 0.85rem);
  letter-spacing: 0.05em;
}

.badge--logo {
  background: none;
  padding: 0;
  border-radius: 0;
  justify-content: center;
  width: 100%;
  margin-bottom: 12px;
}

.badge-logo {
  width: clamp(200px, 60vw, 500px);
  max-width: 100%;
  height: auto;
}

footer {
  margin-top: 36px;
  font-size: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  color: var(--color-muted);
  text-align: center;
}

/* Section heading */
.section-heading {
  margin-top: 48px;
  margin-bottom: 24px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
}

/* Slideshow */
.slideshow-container {
  position: relative;
  width: 100%;
  margin: 24px 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.slideshow-slide {
  display: none;
  width: 100%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.slideshow-slide:hover {
  transform: scale(1.02);
}

.slideshow-slide.active {
  display: block;
}

.slideshow-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* Circular progress indicator */
.slideshow-progress-indicator {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.1s linear;
}

.progress-ring-progress {
  stroke-dasharray: 100.53 100.53; /* 2 * PI * r = 2 * 3.14159 * 16 */
  stroke-dashoffset: 100.53;
  transition: stroke-dashoffset 0.1s linear;
}

/* Image Modal */
.image-modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.image-modal.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
}

.modal-close {
  position: absolute;
  top: 32px;
  right: 48px;
  color: var(--color-text);
  font-size: 48px;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 1001;
}

.modal-close:hover,
.modal-close:focus {
  color: var(--color-accent);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text);
  font-size: 48px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  padding: 16px 24px;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 4px;
  z-index: 1001;
}

.modal-prev {
  left: 24px;
}

.modal-next {
  right: 24px;
}

.modal-nav:hover,
.modal-nav:focus {
  color: var(--color-accent);
  background-color: rgba(0, 0, 0, 0.3);
}

.modal-nav:active {
  transform: translateY(-50%) scale(0.95);
}

@media (max-width: 768px) {
  .modal-nav {
    font-size: 36px;
    padding: 12px 16px;
  }

  .modal-prev {
    left: 12px;
  }

  .modal-next {
    right: 12px;
  }

  .modal-close {
    top: 16px;
    right: 16px;
    font-size: 36px;
  }
}

/* Synopsis section */
.synopsis {
  margin-top: 32px;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  line-height: 1.7;
  color: var(--color-text);
}

.synopsis p {
  margin: 0 0 16px;
}

.feature-list {
  margin: 16px 0;
  padding-left: 24px;
  list-style-type: disc;
}

.feature-list li {
  margin-bottom: 12px;
  line-height: 1.6;
  color: var(--color-text);
}

.feature-list li::marker {
  color: var(--color-accent);
}

.ranking-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  margin: 24px auto 0;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(18, 18, 18, 0.92));
  border: 1px solid rgba(16, 185, 129, 0.28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.ranking-card-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 56px 36px;
  height: 100%;
  text-align: center;
  gap: 8px;
}

.ranking-logo {
  width: 100px;
  height: auto;
}

.ranking-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.ranking-meta {
  display: none;
}

.ranking-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.85rem);
  color: var(--color-muted);
}

.ranking-value {
  font-size: clamp(2.3rem, 2.1rem + 0.8vw, 3rem);
  font-weight: 700;
}

.ranking-message {
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  line-height: 1.5;
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

.ranking-message strong {
  color: var(--color-accent);
}

.ranking-link {
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  color: var(--color-accent);
  text-decoration: none;
}

.ranking-link:hover {
  text-decoration: underline;
}

.share-button {
  margin-top: 18px;
}

.ranking-preview {
  margin-top: 22px;
  text-align: center;
  display: grid;
  gap: 8px;
}

.ranking-preview img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin: 0 auto;
}

.export-hidden {
  display: none !important;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: rgba(26, 26, 26, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--color-text);
  display: inline-block;
}

.referral-link-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.referral-link {
  display: inline-block;
  padding: 6px 10px;
  word-break: break-all;
}

.copy-button {
  padding: 10px 16px;
  border-radius: 10px;
  background: #10b981;
  color: var(--color-text);
  border: none;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.copy-button:disabled {
  opacity: 0.6;
  cursor: default;
}
.ranking-card.exporting {
  box-shadow: none;
}
.referral-title {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2.1rem);
  text-align: center;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.referral-body {
  color: var(--color-text);
  line-height: 1.5;
  margin: 0 0 14px;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
}
.survey-form {
  display: grid;
  gap: 14px;
}

.survey-form label,
.survey-form fieldset {
  display: block;
  font-size: 0.95rem;
  color: var(--color-text);
}

.survey-form .question-hint {
  display: block;
  margin: 6px 0 8px;
  color: var(--color-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.survey-form input[type="text"],
.survey-form input[type="url"],
.survey-form select,
.survey-form textarea {
  margin-top: 6px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(161, 161, 170, 0.25);
  background: rgba(26, 26, 26, 0.55);
  color: var(--color-text);
}

.survey-form textarea {
  resize: vertical;
}

.survey-form fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

.survey-form legend {
  font-weight: 600;
  margin-bottom: 6px;
}

.survey-form label.inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
}

.survey-form select[multiple] {
  min-height: 80px;
}

.survey-form .share-button {
  margin-top: 4px;
}

.required {
  color: var(--color-accent);
}

#value-preview {
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 900px) {
  .card--wide {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  main {
    justify-content: flex-start;
    padding: 32px 16px 48px;
  }

  .card {
    padding: 28px 22px;
  }

  .card--wide {
    padding: 32px 22px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .table-card header {
    padding: 16px;
  }

  .table-scroll table {
    min-width: 640px;
  }

  .referral-link-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-button {
    width: 100%;
  }

  .ranking-card-inner {
    padding: 32px 24px;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 28px 12px 40px;
  }

  .card {
    padding: 24px 18px;
  }

  .ranking-card {
    max-width: 100%;
  }

  .ranking-logo {
    width: 72px;
  }
}

/* Sticky Bottom CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: linear-gradient(to top, rgba(18, 18, 18, 0.98) 0%, rgba(18, 18, 18, 0.95) 70%, rgba(18, 18, 18, 0) 100%);
  padding: 12px 0 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sticky-cta-button {
  width: calc(100% - 32px);
  max-width: 600px;
  margin: 0 auto;
  display: block;
  padding: 14px 24px !important;
  font-size: 14px !important;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.sticky-cta-button:hover {
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.sticky-cta-button:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .sticky-cta-button {
    font-size: 13px !important;
    padding: 12px 20px !important;
  }
}

/* Add padding to body to prevent content from being hidden behind sticky CTA */
body {
  padding-bottom: 80px;
}

/* Sticky Survey CTA (result.html) */
.sticky-survey-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: linear-gradient(to top, rgba(18, 18, 18, 0.98) 0%, rgba(18, 18, 18, 0.95) 70%, rgba(18, 18, 18, 0) 100%);
  padding: 12px 0 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.sticky-survey-cta.hidden {
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}

.sticky-survey-button {
  width: calc(100% - 32px);
  max-width: 600px;
  margin: 0 auto;
  display: block;
  padding: 14px 24px !important;
  font-size: 14px !important;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.sticky-survey-button:hover {
  transform: translateY(-2px);
}

.sticky-survey-button:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .sticky-survey-button {
    font-size: 13px !important;
    padding: 12px 20px !important;
  }
}

/* Clickable referral link styling */
.referral-link-clickable {
  color: var(--color-muted);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.2s ease, text-decoration 0.2s ease;
  cursor: pointer;
}

.referral-link-clickable:hover,
.referral-link-clickable:focus {
  color: var(--color-text);
  text-decoration: underline;
}

/* Progress Card */
.progress-card {
  margin-top: 32px;
  overflow: hidden;
  word-break: normal !important;
}

.progress-header-content {
  width: 100%;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
}

.progress-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 0 8px 0;
}

.progress-position {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text);
  margin: 0;
  transition: color 0.2s ease;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
}

.progress-body {
  margin-top: 24px;
}

.progress-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.progress-stat {
  text-align: center;
  padding: 16px;
  background: rgba(26, 26, 26, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-survey,
.progress-wave {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.survey-label,
.wave-label {
  font-weight: 600;
  color: var(--color-text);
}

.survey-status {
  color: var(--color-muted);
}

.survey-status.completed {
  color: var(--color-accent);
}

.survey-status.link {
  color: var(--color-accent);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.survey-status.link:hover {
  color: var(--color-text);
}

.wave-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.2);
  color: var(--color-accent);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.wave-badge.highest-50 {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.4);
}

.wave-badge.rank-50-250 {
  background: rgba(192, 192, 192, 0.2);
  color: #c0c0c0;
  border-color: rgba(192, 192, 192, 0.4);
}

.wave-badge.rank-250-750 {
  background: rgba(205, 127, 50, 0.2);
  color: #cd7f32;
  border-color: rgba(205, 127, 50, 0.4);
}

.wave-badge.rank-750-plus {
  background: rgba(16, 185, 129, 0.2);
  color: var(--color-accent);
  border-color: rgba(16, 185, 129, 0.4);
}

@media (max-width: 768px) {
  .progress-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-value {
    font-size: 28px;
  }

  .progress-position {
    font-size: 16px;
  }

  .progress-survey,
  .progress-wave {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
