:root {
  --sat: env(safe-area-inset-top);
  --sab: env(safe-area-inset-bottom);
  --sal: env(safe-area-inset-left);
  --sar: env(safe-area-inset-right);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: white;
  transition: background 0.8s ease-in-out;
}
.navbar {
  padding: calc(1rem + var(--sat)) max(2rem, var(--sal)) 0 max(2rem, var(--sar));
  position: relative;
  z-index: 10;
}
.nav-content {
  max-width: 1200px;
  margin: 0 auto;
}
.name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.title {
  font-size: 0.9rem;
  opacity: 0.8;
  font-weight: 500;
}
.hero {
  text-align: center;
  padding: 4rem max(2rem, var(--sal)) 3rem max(2rem, var(--sar));
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 6.0rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #fff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}
.about {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 max(2rem, var(--sal)) 0 max(2rem, var(--sar));
  text-align: center;
  margin-bottom: 4rem;
}
.about h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.about p {
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.9;
}
.stamina-showcase {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 max(2rem, var(--sal)) calc(4rem + var(--sab)) max(2rem, var(--sar));
}
.showcase-card {
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.card-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.8;
  min-height: 20px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.status-text {
  font-weight: 500;
  min-width: 80px;
}
.timestamp {
  opacity: 0.7;
  transition: opacity 0.4s ease;
  display: none;
}
.stamina-display {
  margin: 3rem 0;
}
.stamina-container {
  width: 100%;
}
.loading-label {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
}
.stamina-bar-wrapper {
  position: relative;
  width: 100%;
  height: 35px;
}
.stamina-bar {
  width: 100%;
  height: 100%;
  border-radius: 17.5px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.background-bar {
  background: linear-gradient(90deg,
      rgba(142, 142, 147, 0.4),
      rgba(142, 142, 147, 0.6));
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
.loading-bar {
  background: linear-gradient(90deg,
      rgba(142, 142, 147, 0.4),
      rgba(142, 142, 147, 0.6));
  animation: loadingGlow 1.8s ease-in-out infinite alternate;
}
@keyframes loadingGlow {
  0% {
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.15);
    transform: scale(1);
  }

  100% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: scale(1.02);
  }
}
.shimmer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.15),
      transparent);
  border-radius: 17.5px;
  transition: opacity 0.3s ease;
}
.fill-bar {
  height: 100%;
  border-radius: 17.5px;
  position: relative;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 20%;
  transform: translateZ(0);
}
.fill-bar.pulse {
  animation: staminaPulse 2s ease-in-out infinite alternate;
}
@keyframes staminaPulse {
  0% {
    filter: drop-shadow(0 0 0px currentColor);
    transform: scale(1) translateZ(0);
  }
  100% {
    filter: drop-shadow(0 0 8px currentColor);
    transform: scale(1.015) translateZ(0);
  }
}
.highlight-shine {
  position: absolute;
  top: -45%;
  right: 20%;
  width: 30%;
  height: 30%;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 17.5px;
  opacity: 0.8;
}
.percentage-text {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: baseline;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 20;
  pointer-events: none;
}
.percentage-number {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.percentage-symbol {
  font-size: 1rem;
  font-weight: 600;
  margin-left: 1px;
}
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .showcase-card {
    padding: 1.5rem;
  }
  .stamina-showcase {
    padding: 0 max(1rem, var(--sal)) calc(4rem + var(--sab)) max(1rem, var(--sar));
  }
  .about {
    padding: 0 max(1rem, var(--sal)) 0 max(1rem, var(--sar));
  }
}
.modern-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.modern-navbar.scrolled {
  background: rgba(15, 23, 42, 0);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
}
.nav-container {
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 40px;
}
.nav-brand {
  flex: 0 0 auto;
  margin-right: auto;
}
.brand-name {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: white;
  letter-spacing: -0.5px;
}
.brand-tagline {
  font-size: 12px;
  margin: 4px 0 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}
.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-link {
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  white-space: nowrap;
  color: white;
  background: transparent;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
.nav-cta {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
}
.nav-cta:hover {
  background: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
}
.hamburger-menu span {
  width: 28px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  display: block;
}
.hamburger-menu.active span:nth-child(1) {
  display: none;
}
.hamburger-menu.active span:nth-child(2) {
  display: none;
}
.hamburger-menu.active span:nth-child(3) {
  display: none;
}
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  max-width: 80vw;
  height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  z-index: 999;
  transition: left 0.3s ease;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}
.mobile-menu.active {
  left: 0;
}
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.mobile-menu-header h2 {
  color: white;
  font-size: 20px;
  margin: 0;
  font-weight: 700;
}
.close-menu {
  background: transparent;
  border: none;
  color: white;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu-links {
  padding: 20px 0;
}
.mobile-menu-link {
  display: block;
  padding: 16px 20px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.2s ease;
  border-left: 4px solid transparent;
}
.mobile-menu-link:hover,
.mobile-menu-link:active {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: white;
}
.desktop-only {
  display: flex;
}
.navbar {
  display: none;
}
.hero {
  padding-top: 120px;
}
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  background-attachment: fixed;
}
body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.stamina-showcase {
  padding-bottom: 60px;
}
.hero-title {
  font-size: 6.0rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1.5px;
}
.stamina-showcase {
  max-width: 650px;
  margin: 0 auto;
  padding: 0 20px;
}
.showcase-card {
  width: 100%;
}
.hero-buttons {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-button {
  padding: 15px 30px;
  background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}
.cta-button.secondary {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
}
.cta-button.secondary:hover {
  box-shadow: 0 6px 16px rgba(30, 41, 59, 0.4);
}
.user-input-section {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin: 20px 0;
}
.user-input-section h3 {
  margin-bottom: 10px;
  color: white;
}
.user-input-section p {
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}
.user-input-section input {
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  margin-right: 10px;
  width: 180px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
}
.user-input-section input:focus {
  outline: none;
  border-color: #007AFF;
  background: white;
}
.user-input-section button,
.disconnect-btn,
.generate-share-btn {
  padding: 12px 24px;
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
  font-size: 16px;
}
.user-input-section button:hover,
.disconnect-btn:hover,
.generate-share-btn:hover {
  background: #0056CC;
}
.disconnect-btn {
  margin-top: 15px;
  background: #FF3B30;
  width: 100%;
}
.disconnect-btn:hover {
  background: #CC0000;
}
.share-section {
  margin: 20px 0 0 0;
  text-align: center;
}
.toggle-share-btn {
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0;
}
.toggle-share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}
#toggle-icon {
  transition: transform 0.3s ease;
  display: inline-block;
  font-size: 16px;
  font-weight: normal;
}
#toggle-icon.expanded {
  transform: rotate(90deg);
}
.share-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}
.share-content.expanded {
  max-height: 600px;
  opacity: 1;
  margin-top: 20px;
}
.share-unified-container {
  background: transparent;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.share-code-display {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  border: none;
}
.share-code-display h3 {
  margin: 0 0 12px 0;
  color: white;
  font-size: 16px;
  font-weight: 600;
}
.share-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0;
}
.share-code-text {
  background: rgba(0, 0, 0, 0.4);
  padding: 15px 30px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 28px;
  font-weight: bold;
  color: #00FF41;
  letter-spacing: 3px;
  min-width: 160px;
  border: 2px solid rgba(0, 255, 65, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-align: center;
}
.share-code-text:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(0, 255, 65, 0.5);
  transform: scale(1.02);
}
.share-code-text:active {
  transform: scale(0.98);
}
.share-instructions {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.5;
}
.generate-share-btn {
  background: #007AFF;
  margin: 0 0 15px 0;
  font-size: 16px;
  padding: 12px 24px;
  width: 100%;
}
.status-indicator {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s ease;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8E8E93;
  transition: background-color 0.3s;
  flex-shrink: 0;
}
.status-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.status-text {
  font-size: 13px;
  font-weight: 600;
  transition: color 0.3s ease;
  line-height: 1;
}
.status-timestamp {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
}
@media (max-width: 1024px) {
  .hamburger-menu {
    display: flex;
  }
  .desktop-only {
    display: none !important;
  }
  .modern-navbar {
    padding: 15px 0;
    background: rgba(15, 23, 42, 0.95);
  }
  .nav-container {
    padding: 0 20px;
    gap: 15px;
  }
  .brand-name {
    font-size: 18px;
  }
  .nav-cta {
    font-size: 13px;
    padding: 10px 16px;
  }
  .hero {
    padding-top: 100px;
    padding-bottom: 30px;
  }
  .hero-title {
    font-size: 36px;
    margin-bottom: 15px;
  }
  .hero p {
    font-size: 16px;
  }
  .stamina-showcase {
    max-width: 100%;
    padding: 0 20px 40px 20px;
    min-height: auto;
  }
  .showcase-card {
    margin-bottom: 40px;
  }
}
@media (max-width: 480px) {
  .modern-navbar {
    padding: 12px 0;
  }
  .nav-container {
    padding: 0 15px;
  }
  .brand-name {
    font-size: 16px;
  }
  .brand-tagline {
    display: none;
  }
  .nav-cta {
    font-size: 11px;
    padding: 8px 12px;
  }
  .hero {
    padding-top: 90px;
    padding-bottom: 20px;
  }
  .hero-title {
    font-size: 32px;
    line-height: 1.2;
  }
  .hero p {
    font-size: 15px;
  }
  .share-code-box {
    flex-direction: column;
    gap: 12px;
  }
  .share-code-text {
    font-size: 22px;
    letter-spacing: 2px;
  }
  .user-input-section input {
    width: 160px;
    margin-right: 0;
    margin-bottom: 10px;
  }
  .stamina-showcase {
    max-width: 100%;
    padding: 0 15px 40px 15px;
    min-height: auto;
  }
  body {
    min-height: 100vh;
  }
}

/* Video Tutorial Section */
.video-tutorial-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px max(2rem, var(--sal)) calc(4rem + var(--sab)) max(2rem, var(--sar));
}

.video-container {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.video-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: white;
  letter-spacing: -0.5px;
}

.video-description {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  font-weight: 500;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
}

@media (max-width: 1024px) {
  .video-tutorial-section {
    padding: 40px 20px 60px 20px;
  }

  .video-container {
    padding: 2rem 1.5rem;
  }

  .video-title {
    font-size: 1.75rem;
  }

  .video-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .video-tutorial-section {
    padding: 30px 15px 40px 15px;
  }

  .video-container {
    padding: 1.5rem 1rem;
  }

  .video-title {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  .video-description {
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
  }
}