/* ==========================================
   MartiStar Website - Complete Styling
   ========================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  color: #fff;
  background: #0a1a1a;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.hidden {
  display: none !important;
}

/* ==========================================
   PRELOADER - Deep Green with Static Logo
   ========================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #041a14 0%, #0a3d2e 40%, #052a20 70%, #041812 100%);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.logo-glow {
  position: relative;
  display: inline-block;
  padding: 40px;
}

.logo-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(120, 200, 160, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.preloader-logo {
  width: 220px;
  max-width: 50vw;
  filter: drop-shadow(0 0 25px rgba(100, 180, 140, 0.6))
          drop-shadow(0 0 50px rgba(80, 160, 120, 0.3));
  /* Static - NO animation */
}

.preloader-percentage {
  font-family: 'Orbitron', monospace;
  font-size: 56px;
  font-weight: 400;
  color: rgba(140, 200, 170, 0.9);
  letter-spacing: 8px;
  margin-top: 30px;
  text-shadow: 0 0 30px rgba(100, 180, 140, 0.5);
}

.preloader-text {
  font-size: 14px;
  color: rgba(140, 200, 170, 0.5);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 20px;
}

/* ==========================================
   BACKGROUND LAYER
   ========================================== */
.background-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Twinkling Stars */
.stars-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0.4;
  animation: starTwinkle var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.2); }
}

/* Earth Rotation Overlay - hidden (background image has the earth) */
.earth-rotation-overlay {
  display: none;
}

/* ==========================================
   MAIN WRAPPER
   ========================================== */
.main-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 1s ease;
}

.main-wrapper.visible {
  opacity: 1;
}

/* ==========================================
   REGION LINKS - Kompakter
   ========================================== */
.region-link {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
  z-index: 20;
}

.region-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Spain - Left side with mini earth */
.region-spain {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: row;
  overflow: hidden;
}

/* Vietnam - Right Side */
.region-vietnam {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.region-text {
  display: flex;
  flex-direction: column;
}

.region-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.region-desc {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 2px;
}

/* Mini Earth Icon - Static Version */
.region-earth-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: 
    radial-gradient(circle at 35% 35%, #6aafda 0%, #3a7aaf 25%, #2a5a8f 50%, #1a3a5f 80%, #0a1a3f 100%);
  box-shadow: 
    inset -4px -3px 8px rgba(0, 0, 0, 0.4),
    inset 3px 3px 6px rgba(120, 200, 255, 0.15),
    0 0 8px rgba(80, 140, 200, 0.25);
  position: relative;
  overflow: hidden;
}

/* Landmasses on mini earth */
.region-earth-icon::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border-radius: 50%;
  background: 
    radial-gradient(ellipse 25% 35% at 55% 48%, rgba(80, 140, 90, 0.7) 0%, transparent 100%),
    radial-gradient(ellipse 18% 12% at 50% 32%, rgba(90, 150, 100, 0.6) 0%, transparent 100%),
    radial-gradient(ellipse 20% 16% at 72% 42%, rgba(80, 140, 90, 0.6) 0%, transparent 100%);
  pointer-events: none;
}

/* Web-App Icon for Vietnam */
.region-webapp-icon {
  width: 28px;
  height: 28px;
  margin-left: 10px;
  flex-shrink: 0;
  color: rgba(120, 180, 220, 0.85);
  filter: drop-shadow(0 0 4px rgba(80, 140, 200, 0.3));
  transition: all 0.3s ease;
}

.region-webapp-icon svg {
  width: 100%;
  height: 100%;
}

.region-vietnam:hover .region-webapp-icon {
  color: rgba(150, 200, 240, 1);
  filter: drop-shadow(0 0 8px rgba(100, 160, 220, 0.5));
}

/* ==========================================
   CENTER CONTENT - Nach unten verschoben
   ========================================== */
.center-content {
  text-align: center;
  max-width: 600px;
  margin-top: 40px;
  position: relative;
  z-index: 15;
}

/* Logo nur auf Preloader - nicht auf Hauptseite anzeigen */
.main-logo {
  display: none;
}

.brand-title {
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 10px;
  margin-bottom: 10px;
  margin-top: 30px;
  background: linear-gradient(135deg, #fff 0%, #a8d4f0 50%, #90c0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.tagline {
  font-size: clamp(0.9rem, 2.2vw, 1.2rem);
  font-weight: 400;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
}

.membership-notice {
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 15px;
}

/* ==========================================
   CODE FORM - Kompakter & näher am Player
   ========================================== */
.code-form-wrapper {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
}

.code-form {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.code-form:focus-within {
  border-color: rgba(100, 160, 220, 0.5);
  box-shadow: 0 0 20px rgba(100, 160, 220, 0.12);
}

.code-form input {
  width: 160px;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.5px;
  outline: none;
}

.code-form input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.code-arrow {
  padding: 8px 12px;
  border: none;
  background: linear-gradient(135deg, rgba(100, 160, 220, 0.35) 0%, rgba(80, 140, 200, 0.2) 100%);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-arrow svg {
  width: 14px;
  height: 14px;
}

.code-arrow:hover {
  background: linear-gradient(135deg, rgba(100, 160, 220, 0.5) 0%, rgba(80, 140, 200, 0.35) 100%);
}

.error-message {
  display: none;
  color: #ff7b7b;
  font-size: 11px;
  margin-top: 8px;
  text-align: center;
}

.error-message.show {
  display: block;
}

/* ==========================================
   AUDIO PLAYER - Kompakt & dezent
   ========================================== */
.audio-player {
  position: fixed;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 25px;
  z-index: 30;
}

.audio-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.audio-btn svg {
  width: 12px;
  height: 12px;
}

.audio-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-play {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, rgba(80, 140, 200, 0.4) 0%, rgba(60, 120, 180, 0.2) 100%);
  color: #fff;
}

.btn-play svg {
  width: 14px;
  height: 14px;
}

.btn-play:hover {
  background: linear-gradient(135deg, rgba(80, 140, 200, 0.55) 0%, rgba(60, 120, 180, 0.35) 100%);
  transform: scale(1.05);
}

.volume-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
}

.volume-slider {
  width: 55px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
}

/* ==========================================
   FOOTER - Kompakter
   ========================================== */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
  text-align: center;
  z-index: 25;
}

.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-size: 10px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-nav .sep {
  color: rgba(255, 255, 255, 0.15);
  font-size: 9px;
}

.copyright {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.3px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .region-spain {
    left: 15px;
    bottom: 40%;
  }
  
  .region-vietnam {
    right: 15px;
    top: 35%;
  }
}

@media (max-width: 768px) {
  .region-link {
    position: static;
    margin: 8px;
    padding: 8px 12px;
  }
  
  .region-spain,
  .region-vietnam {
    transform: none;
  }
  
  .main-wrapper {
    padding-top: 100px;
    padding-bottom: 120px;
  }
  
  .center-content {
    margin-top: 0;
  }
  
  .region-earth-icon {
    width: 28px;
    height: 28px;
  }
  
  .region-webapp-icon {
    width: 24px;
    height: 24px;
    margin-left: 8px;
  }
  
  .region-name {
    font-size: 12px;
  }
  
  .region-desc {
    font-size: 10px;
  }
}

@media (max-width: 600px) {
  .code-form-wrapper {
    bottom: 90px;
  }
  
  .code-form input {
    width: 140px;
    padding: 7px 12px;
    font-size: 12px;
  }
  
  .code-arrow {
    padding: 7px 10px;
  }
  
  .audio-player {
    padding: 5px 10px;
    gap: 4px;
    bottom: 45px;
  }
  
  .audio-btn {
    width: 24px;
    height: 24px;
  }
  
  .audio-btn svg {
    width: 10px;
    height: 10px;
  }
  
  .btn-play {
    width: 28px;
    height: 28px;
  }
  
  .btn-play svg {
    width: 12px;
    height: 12px;
  }
  
  .volume-slider {
    width: 40px;
  }
  
  .preloader-percentage {
    font-size: 42px;
  }
  
  .preloader-logo {
    width: 160px;
  }
  
  .brand-title {
    letter-spacing: 6px;
  }
  
  .tagline {
    letter-spacing: 2px;
  }
}

/* Mobile Layout for regions */
@media (max-width: 768px) {
  .region-link {
    position: relative;
    display: inline-flex;
  }
  
  .region-spain {
    left: auto;
    bottom: auto;
  }
  
  .region-vietnam {
    right: auto;
    top: auto;
  }
}
