@font-face {
  font-family: 'Dumbeldor';
  src: url('/dumbeldor.ttf'), format('ttf');
  font-weight: normal;
  font-style: normal;
}

html,
body {
  margin: 0;
  background-color: #273940;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Dumbeldor', sans-serif;
}

h1 {
  font-size: 3em;
  text-decoration: underline;
}

h2 {
  font-size: 2em;
}

h3 {
  font-size: 1.5em;
}

a {
  color: white;
  font-size: 1.5em;
}

#root {
  width: 100%;
  height: 100%;
}

#app {
  height: 100%;
}

#ui-container {
  position: fixed;
  top: 8px;
  right: 8px;
  width: 300px;
}

:root {
  --tp-base-background-color: hsla(0, 0%, 10%, 0.80);
  --tp-base-shadow-color: hsla(0, 0%, 0%, 0.20);
  --tp-button-background-color: hsla(0, 0%, 80%, 1.00);
  --tp-button-background-color-active: hsla(0, 0%, 100%, 1.00);
  --tp-button-background-color-focus: hsla(0, 0%, 95%, 1.00);
  --tp-button-background-color-hover: hsla(0, 0%, 85%, 1.00);
  --tp-button-foreground-color: hsla(0, 0%, 0%, 0.80);
  --tp-container-background-color: hsla(0, 0%, 0%, 0.30);
  --tp-container-background-color-active: hsla(0, 0%, 0%, 0.60);
  --tp-container-background-color-focus: hsla(0, 0%, 0%, 0.50);
  --tp-container-background-color-hover: hsla(0, 0%, 0%, 0.40);
  --tp-container-foreground-color: hsla(0, 0%, 100%, 0.50);
  --tp-groove-foreground-color: hsla(0, 0%, 0%, 0.20);
  --tp-input-background-color: hsla(0, 0%, 0%, 0.30);
  --tp-input-background-color-active: hsla(0, 0%, 0%, 0.60);
  --tp-input-background-color-focus: hsla(0, 0%, 0%, 0.50);
  --tp-input-background-color-hover: hsla(0, 0%, 0%, 0.40);
  --tp-input-foreground-color: hsla(0, 0%, 100%, 0.50);
  --tp-label-foreground-color: hsla(0, 0%, 100%, 0.50);
  --tp-monitor-background-color: hsla(0, 0%, 0%, 0.30);
  --tp-monitor-foreground-color: hsla(0, 0%, 100%, 0.30);
}

.about-icon {
  position: fixed;
  top: 18px;
  left: 18px;
  width: 40px;
  height: 34px;
  cursor: pointer;
}

.audio-icon {
  display: block;
  position: fixed;
  top: 18px;
  right: 60px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 10001;
  transition: opacity 0.3s ease;
}

#loading-screen {
  background-color: #000;
  width: 100%;
  height: 100%;
  position: fixed;
  z-index: 9999;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 64px;
  box-sizing: border-box;
}

#logo {
  position: relative;
  margin: 64px;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
}


#loading-text {
  font-size: 20px;
  color: white;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin-bottom: 30px;
  position: relative;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 1),
      rgba(255, 255, 255, 1),
      rgba(255, 255, 255, 0.6));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 2s ease-in-out infinite;
}

@keyframes textShine {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

#loading-screen #progress-container {
  width: 600px !important;
  height: 6px !important;
  background-color: rgba(255, 255, 255, 0.3) !important;
  border: none !important;
  border-radius: 3px !important;
  margin: 30px auto 0 auto !important;
  position: relative !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#loading-screen #progress-bar {
  width: 0%;
  height: 6px !important;
  background: #ffffff !important;
  border-radius: 3px !important;
  transition: width 0.3s ease-out !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@keyframes progressShine {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.about-dialog {
  background: linear-gradient(135deg, #1e1e1e, #444);
  color: #fff;
  border-radius: 32px;
  width: 90%;
  max-width: 500px;
  padding: 32px;
  margin: 16px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 4px solid white;
}

.about-dialog img {
  width: 128px;
  height: 128px;
  border-radius: 16px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.social-icons a {
  color: #fff;
  font-size: 24px;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #00acee;
}

.close-button {
  margin-top: 24px;
  padding: 12px 24px;
  border: none;
  background: #555;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.close-button:hover {
  background: #777;
}

@media (max-width: 800px) {
  #root {
    display: flex;
    flex-direction: column;
  }

  #app {
    height: 100vh;
  }

  #ui-container {
    position: relative;
    width: 100%;
    overflow-y: auto;
    overscroll-behavior: none;
    top: auto;
    right: auto;
    zoom: 1.3;
  }

  .about-icon {
    position: fixed;
    top: 12px;
    left: 8px;
    width: 30px;
    height: 26px;
    cursor: pointer;
  }

  .audio-icon {
    display: block;
    position: fixed;
    top: 12px;
    right: 46px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10001;
    transition: opacity 0.3s ease;
  }
}

@media (max-width: 800px) {
  #loading-screen #progress-container {
    width: 300px !important;
    height: 6px !important;
  }
}

@media (max-width: 675px) {
  #loading-text {
    font-size: 2em;
  }

  #loading-screen #progress-container {
    width: 280px !important;
    height: 6px !important;
  }
}

@media (max-width: 575px) {
  #loading-text {
    font-size: 1.8em;
  }

  #loading-screen #progress-container {
    width: 250px !important;
    height: 6px !important;
  }
}

@media (max-width: 475px) {
  #loading-text {
    font-size: 1.5em;
  }

  #loading-screen #progress-container {
    width: 220px !important;
    height: 6px !important;
  }
}

@media (max-width: 350px) {
  #loading-text {
    font-size: 1.2em;
  }

  #loading-screen #progress-container {
    width: 180px !important;
    height: 6px !important;
  }
}

#about-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#about-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.about-popup-container {
  max-width: 90%;
  width: 90%;
  max-height: 90vh;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

.about-popup-content {
  background: rgba(26, 35, 24, 0.95);
  border: 2px solid #3d4a3a;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
}

.about-popup-content iframe {
  width: 100%;
  height: 90vh;
  border: none;
  background: transparent;
}

.about-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(127, 176, 105, 0.9);
  color: #1a2318;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.about-close-btn:hover {
  background: #7fb069;
  transform: scale(1.1);
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 800px) {
  .about-popup-container {
    width: 90%;
  }

  .about-popup-content iframe {
    height: 80vh;
  }

  .about-close-btn {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  #loading-text {
    font-size: 14px;
  }
}

/* Responsive fix for height-constrained screens (1400x766, 1366x768, etc.) */
@media (max-height: 850px) {
    #loading-screen {
        padding: 24px;
    }

    #logo {
        /* Shrink logo to 40% of screen height */
        max-height: 40vh;
        max-width: 40vh;
        margin: 16px auto;
        /* Tighter margins */
        width: auto;
    }

    #loading-screen #progress-container {
        /* FORCE the width to match the logo's size (40vh) */
        width: 40vh !important;
        margin-top: 12px !important;
    }

    #loading-text {
        font-size: 1em;
        margin-bottom: 12px;
    }
}