/* === REUSABLE UI COMPONENTS === */

/* === LOGO COMPONENTS === */

.header-logo {
  height: 55px;
  width: auto;
}

.main-logo {
  height: 180px;
  width: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 20px rgba(255, 141, 64, 0.2));
  transition: all 0.5s var(--smooth-easing);
  will-change: transform, filter;
}

.logo-container {
  margin: 0 auto 35px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  will-change: transform;
  transition: transform 0.3s var(--smooth-easing);
}

.brand-text {
  font-weight: 900;
  font-style: italic;
  font-size: 36px;
  color: var(--text);
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1;
  margin: 0;
  transition: all 0.4s var(--smooth-easing);
}

.home-logo {
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 20px rgba(255, 141, 64, 0.3));
}

/* Logo hover effects */
.logo-container:hover .brand-text {
  letter-spacing: 0.005em;
}

.logo-container:hover .main-logo {
  transform: scale(1.03);
  filter: drop-shadow(0 8px 35px rgba(255, 141, 64, 0.4));
}

/* === BUTTON COMPONENTS === */

/* Path Button - Used on both premium and athlete pages */
.path-button {
  position: relative;
  background: var(--bg-elevated);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 50px 30px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: all 0.4s var(--smooth-easing);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: transform;
  transform-style: preserve-3d;
  cursor: pointer;
}

/* Gradient fill rises from bottom */
.path-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 141, 64, 0.08) 0%,
    rgba(255, 141, 64, 0.04) 100%
  );
  border-radius: 14px;
  transform: translateY(100%);
  transition: transform 0.4s var(--smooth-easing);
  z-index: 0;
}

/* Subtle border glow */
.path-button::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--brand-gradient);
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.4s var(--smooth-easing);
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1px;
}

.path-button:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: transparent;
  background: rgba(46, 46, 46, 0.95);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 141, 64, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.path-button:hover::before {
  transform: translateY(0);
}

.path-button:hover::after {
  opacity: 0.6;
}

.path-button:active {
  transform: translateY(-8px) scale(0.98);
  transition: all 0.1s ease;
}

.path-button:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
  border-color: var(--brand);
}

/* Button Typography */
.button-title {
  font-weight: 800;
  font-style: italic;
  font-size: 32px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  transition: all 0.3s var(--smooth-easing);
  position: relative;
  z-index: 1;
}

.path-button:hover .button-title {
  transform: scale(1.05);
  letter-spacing: 0.01em;
  color: var(--brand);
}

.button-subtitle {
  color: var(--text-dim);
  margin-bottom: 30px;
  font-size: 16px;
  max-width: 300px;
  transition: color 0.3s ease;
  position: relative;
  z-index: 1;
}

.path-button:hover .button-subtitle {
  color: #aaa;
}

.button-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--brand);
  text-decoration: none;
  transition: all 0.3s var(--smooth-easing);
  position: relative;
  z-index: 1;
}

.button-cta svg {
  transition: transform 0.4s var(--spring-easing);
}

.path-button:hover .button-cta svg {
  transform: translateX(6px);
  animation: arrowBounce 0.6s ease-in-out infinite;
}

/* Hero CTA Button - Used on athlete page */
.hero-cta {
  position: relative;
  background: var(--bg-elevated);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 28px 60px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.4s var(--smooth-easing);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 800;
  font-style: italic;
  font-size: 20px;
  letter-spacing: -0.01em;
  will-change: transform;
  transform-style: preserve-3d;
  cursor: pointer;
  min-width: 300px;
}

.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 141, 64, 0.12) 0%,
    rgba(255, 141, 64, 0.06) 100%
  );
  border-radius: 14px;
  transform: translateY(100%);
  transition: transform 0.4s var(--smooth-easing);
  z-index: 0;
}

.hero-cta::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--brand-gradient);
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.4s var(--smooth-easing);
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1px;
}

.hero-cta:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: transparent;
  background: rgba(46, 46, 46, 0.95);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 141, 64, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-cta:hover::before {
  transform: translateY(0);
}

.hero-cta:hover::after {
  opacity: 0.6;
}

.hero-cta:active {
  transform: translateY(-8px) scale(0.98);
  transition: all 0.1s ease;
}

.hero-cta:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}

.hero-cta svg {
  transition: transform 0.4s var(--spring-easing);
}

.hero-cta:hover svg {
  transform: translateX(6px);
  animation: arrowBounce 0.6s ease-in-out infinite;
}

/* === CARD COMPONENTS === */

/* Info Card - Used in athlete page */
.info-card {
  background: rgba(46,46,46,0.8);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  backdrop-filter: blur(12px);
}

.info-card:active {
  transform: scale(0.98);
}

.info-card:hover {
  border-color: rgba(255,141,64,0.4);
  background: rgba(56,56,56,0.9);
}

.info-card .card-icon {
  font-size: 40px;
  flex-shrink: 0;
  line-height: 1;
}

.info-card .card-label {
  flex: 1;
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.card-tap-btn {
  background: linear-gradient(135deg, #FF8D40 0%, #FF6B35 100%);
  border: none;
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.card-tap-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,141,64,0.4);
}

.viewed-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s;
  pointer-events: none;
}

.info-card[data-viewed="true"] .viewed-check {
  opacity: 1;
  transform: scale(1);
}

.info-card[data-viewed="true"] {
  border-color: rgba(16,185,129,0.3);
}

/* Expanded Content Area */
.expanded-content-area {
  min-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}

.expanded-content-area.active {
  min-height: 300px;
  margin-bottom: 24px;
}

.content-display {
  background: rgba(36,36,36,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  backdrop-filter: blur(16px);
  animation: slideIn 0.4s cubic-bezier(0.4,0,0.2,1);
}

.content-display h4 {
  font-size: 26px;
  font-weight: 900;
  margin: 0 0 24px 0;
  color: #FF8D40;
}

/* Close Buttons */
.close-content,
.close-card,
.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease, opacity 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  width: auto;
  height: auto;
  display: inline-block;
}

.close-content:hover,
.close-card:hover,
.close-btn:hover {
  color: rgba(255,255,255,0.8);
  opacity: 1;
}

.close-content:active,
.close-card:active,
.close-btn:active {
  opacity: 0.5;
}

/* Mobile close button adjustments */
@media (max-width: 768px) {
  .close-content,
  .close-card,
  .close-btn {
    font-size: 28px;
    padding: 12px;
    top: 16px;
    right: 16px;
  }
}

/* === LOADING COMPONENTS === */

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

.loader-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  animation: logoFloat 2s ease-in-out infinite;
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-progress {
  height: 100%;
  background: var(--brand-gradient);
  width: 0%;
  animation: loadProgress 1.5s ease-out forwards;
  box-shadow: 0 0 20px rgba(255, 141, 64, 0.5);
}

/* === BACKGROUND DECORATION COMPONENTS === */

.bg-decoration {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.gradient-circle {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.03;
  will-change: transform;
  transition: opacity 0.6s ease;
}

.circle-athlete {
  background: var(--athlete-gradient);
  top: -150px;
  right: -150px;
  animation: floatComplex 25s ease-in-out infinite;
}

.circle-brand {
  background: var(--brand-gradient);
  bottom: -150px;
  left: -150px;
  animation: floatComplex 25s ease-in-out infinite reverse;
}

/* === SITE HEADER === */

.site-header {
  padding: 30px 40px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 26, 0.9) 0%,
    rgba(26, 26, 26, 0.7) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  height: 100px;
}

.header-logo {
  height: 55px;
  width: auto;
}

.home-logo {
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 20px rgba(255, 141, 64, 0.3));
}

/* Mobile header styles */
@media (max-width: 767px) {
  .site-header {
    padding: 20px 24px;
    height: 80px;
  }

  .header-logo {
    height: 50px;
  }
}

/* === SITE FOOTER === */

.site-footer {
  padding: 60px 24px 40px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 0;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: var(--brand);
}

.footer-link:hover::after {
  width: 100%;
}

.copyright {
  color: var(--text-dim);
  font-size: 14px;
}

/* Mobile footer styles */
@media (max-width: 767px) {
  .footer-links {
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
  }

  .footer-link {
    padding: 12px 0;
  }
}