/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
  background: #0a0e1a;
  color: #ffffff;
}

/* Animated Background */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0e1a 0%, #1a1f35 50%, #0a0e1a 100%);
  z-index: -1;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 15s ease-in-out infinite;
}

.glow-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.4), transparent);
  top: 10%;
  left: -10%;
  animation-delay: 0s;
}

.glow-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 150, 255, 0.3), transparent);
  bottom: 20%;
  right: -5%;
  animation-delay: 5s;
}

.glow-orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(100, 200, 255, 0.25), transparent);
  top: 50%;
  left: 50%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -50px) scale(1.1); }
  66% { transform: translate(-50px, 50px) scale(0.9); }
}

/* Header */
.game-header {
  text-align: center;
  padding: 30px 20px 20px;
  position: relative;
  z-index: 10;
}

.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.3), transparent);
  border-radius: 50%;
  filter: blur(30px);
  animation: pulse 3s ease-in-out infinite;
}

.logo-text {
  position: relative;
  font-size: 48px;
  font-weight: bold;
  background: linear-gradient(135deg, #00ffff 0%, #0099ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
  letter-spacing: 2px;
}

.tagline {
  font-size: 18px;
  color: #00d4ff;
  letter-spacing: 3px;
  font-weight: 300;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
  font-family: 'Courier New', monospace;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

/* Unity Container */
#unity-container {
  position: relative;
  margin: 30px auto;
  max-width: 960px;
}

#unity-container.unity-desktop {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
}

#unity-container.unity-mobile {
  position: fixed;
  width: 100%;
  height: 100%;
  margin: 0;
}

#unity-canvas {
  background: #0a0e1a;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 
    0 0 40px rgba(0, 255, 255, 0.3),
    0 0 80px rgba(0, 150, 255, 0.2),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 255, 255, 0.2);
}

.unity-mobile #unity-canvas {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* Loading Screen */
#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  background: rgba(10, 14, 26, 0.95);
  padding: 40px 60px;
  border-radius: 16px;
  border: 2px solid rgba(0, 255, 255, 0.3);
  box-shadow: 
    0 0 40px rgba(0, 255, 255, 0.2),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#unity-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mask-logo {
  width: 100px;
  height: 100px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoSpin 4s ease-in-out infinite;
}

.shield-icon {
  width: 80px;
  height: 90px;
  background: linear-gradient(135deg, #00ffff 0%, #0099ff 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  position: relative;
  box-shadow: 
    0 0 30px rgba(0, 255, 255, 0.6),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
}

.shield-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: #0a0e1a;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

@keyframes logoSpin {
  0%, 100% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(180deg) scale(1.1); }
}

.loading-text {
  color: #00d4ff;
  font-size: 16px;
  margin-bottom: 20px;
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#unity-progress-bar-container {
  width: 280px;
  position: relative;
}

#unity-progress-bar-empty {
  width: 100%;
  height: 24px;
  background: rgba(0, 50, 80, 0.6);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.3);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  position: relative;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00d4ff 0%, #00ffff 50%, #00d4ff 100%);
  border-radius: 12px;
  transition: width 0.3s ease;
  box-shadow: 
    0 0 20px rgba(0, 255, 255, 0.6),
    inset 0 0 10px rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

#unity-progress-bar-full::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

.progress-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
  font-family: 'Courier New', monospace;
  z-index: 10;
}

/* Security Tips in Loading Screen */
.security-tip {
  margin-top: 25px;
  text-align: center;
  max-width: 400px;
  padding: 20px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.tip-icon {
  font-size: 24px;
  margin-bottom: 10px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.tip-text {
  color: #00d4ff;
  font-size: 13px;
  line-height: 1.6;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: opacity 0.3s ease;
}

/* Download Stats */
.download-stats {
  margin-top: 20px;
  width: 100%;
  max-width: 400px;
  padding: 16px 20px;
  background: rgba(0, 100, 150, 0.15);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.15);
  font-family: 'Courier New', monospace;
}

.download-stats-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.download-stats-icon {
  font-size: 16px;
}

.download-stats-title {
  font-size: 12px;
  color: #00d4ff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: bold;
}

.download-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  gap: 12px;
}

.download-label {
  color: #5a8a9e;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.download-value {
  color: #00ffcc;
  font-size: 12px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

/* Warning Messages */
#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: rgba(10, 14, 26, 0.95);
  padding: 15px 25px;
  display: none;
  border-radius: 8px;
  border: 1px solid rgba(255, 50, 50, 0.5);
  box-shadow: 0 0 20px rgba(255, 50, 50, 0.3);
  z-index: 1000;
  max-width: 80%;
  font-family: 'Courier New', monospace;
}

/* Footer */
#unity-footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 15px 20px;
  background: rgba(10, 14, 26, 0.8);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.unity-mobile #unity-footer {
  display: none;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

#unity-build-title {
  font-size: 20px;
  font-weight: bold;
  background: linear-gradient(135deg, #00ffff 0%, #0099ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.version-info {
  font-size: 12px;
  color: #00d4ff;
  font-family: 'Courier New', monospace;
  opacity: 0.7;
}

.footer-right {
  display: flex;
  align-items: center;
}

#unity-fullscreen-button {
  width: 44px;
  height: 44px;
  background: rgba(0, 212, 255, 0.1);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
}

#unity-fullscreen-button svg {
  width: 24px;
  height: 24px;
  color: #00d4ff;
  transition: all 0.3s ease;
}

#unity-fullscreen-button:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: #00ffff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
  transform: scale(1.05);
}

#unity-fullscreen-button:hover svg {
  color: #00ffff;
  transform: scale(1.1);
}

#unity-fullscreen-button:active {
  transform: scale(0.95);
}

/* Info Section */
.info-section {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.info-card {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.info-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
  background: rgba(10, 14, 26, 0.8);
}

.info-card h3 {
  font-size: 20px;
  margin: 0 0 15px 0;
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.info-card p {
  margin: 0;
  color: #a0b5c7;
  line-height: 1.6;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .logo-text {
    font-size: 36px;
  }
  
  .tagline {
    font-size: 14px;
  }
  
  #unity-canvas {
    border-radius: 8px;
  }
  
  #unity-loading-bar {
    padding: 30px 40px;
  }

  .download-stats {
    max-width: 320px;
    padding: 12px 16px;
  }
  
  .download-value {
    max-width: 180px;
    font-size: 11px;
  }
  
  .info-section {
    flex-direction: column;
    align-items: center;
  }
  
  .info-card {
    max-width: 100%;
  }
}

/* Character Showcase Section */
.character-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.character-content {
  display: flex;
  align-items: center;
  gap: 60px;
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 16px;
  padding: 50px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.character-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.character-text {
  flex: 1;
  position: relative;
  z-index: 2;
}

.character-text h2 {
  font-size: 42px;
  margin: 0 0 10px 0;
  background: linear-gradient(135deg, #00ffff 0%, #0099ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

.character-subtitle {
  font-size: 20px;
  color: #00d4ff;
  margin: 0 0 20px 0;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

.character-description {
  font-size: 16px;
  line-height: 1.8;
  color: #a0b5c7;
  margin-bottom: 30px;
}

.character-features {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: #ffffff;
  padding: 12px 20px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 255, 255, 0.4);
  transform: translateX(5px);
}

.feature-icon {
  font-size: 24px;
}

.character-image {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.character-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.3), transparent);
  border-radius: 50%;
  filter: blur(60px);
  animation: pulse 4s ease-in-out infinite;
}

.character-image img {
  position: relative;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(0, 255, 255, 0.4));
  animation: breathe 4s ease-in-out infinite;
  z-index: 2;
}

/* Features Grid */
.features-grid {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.feature-card {
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 12px;
  padding: 35px 25px;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.5s ease;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 0 15px 40px rgba(0, 255, 255, 0.3);
  background: rgba(10, 14, 26, 0.8);
}

.feature-icon-large {
  font-size: 48px;
  margin-bottom: 20px;
  display: inline-block;
  animation: breathe 3s ease-in-out infinite;
}

.feature-card:nth-child(2) .feature-icon-large {
  animation-delay: 0.75s;
}

.feature-card:nth-child(3) .feature-icon-large {
  animation-delay: 1.5s;
}

.feature-card:nth-child(4) .feature-icon-large {
  animation-delay: 2.25s;
}

@keyframes breathe {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
  }
  50% { 
    transform: scale(1.08);
    opacity: 0.9;
  }
}

.feature-card h3 {
  font-size: 20px;
  margin: 0 0 15px 0;
  color: #00ffff;
  position: relative;
  z-index: 2;
}

.feature-card p {
  margin: 0;
  color: #a0b5c7;
  line-height: 1.6;
  font-size: 14px;
  position: relative;
  z-index: 2;
}

/* Call to Action Section */
.cta-section {
  max-width: 800px;
  margin: 80px auto;
  padding: 60px 40px;
  text-align: center;
  background: rgba(10, 14, 26, 0.8);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cta-section h2 {
  font-size: 36px;
  margin: 0 0 15px 0;
  background: linear-gradient(135deg, #00ffff 0%, #0099ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 2;
}

.cta-section p {
  font-size: 18px;
  color: #a0b5c7;
  margin: 0 0 35px 0;
  position: relative;
  z-index: 2;
}

.cta-button {
  padding: 18px 50px;
  font-size: 18px;
  font-weight: bold;
  color: #0a0e1a;
  background: linear-gradient(135deg, #00ffff 0%, #00d4ff 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
  position: relative;
  z-index: 2;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 255, 255, 0.5);
  background: linear-gradient(135deg, #00d4ff 0%, #00ffff 100%);
}

.cta-button:active {
  transform: translateY(-1px);
}

/* Contact Section / Footer */
.contact-section {
  margin-top: 80px;
  padding: 60px 20px 30px;
  background: rgba(10, 14, 26, 0.9);
  border-top: 2px solid rgba(0, 255, 255, 0.3);
  position: relative;
}

.contact-content {
  max-width: 1200px;
  margin: 0 auto 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
  flex-wrap: wrap;
}

.contact-info h3 {
  font-size: 24px;
  margin: 0 0 20px 0;
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  padding: 15px 0;
}

.contact-icon {
  font-size: 24px;
}

.contact-item a {
  color: #00d4ff;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: 'Courier New', monospace;
}

.contact-item a:hover {
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.footer-branding {
  text-align: right;
}

.footer-logo {
  font-size: 32px;
  font-weight: bold;
  background: linear-gradient(135deg, #00ffff 0%, #0099ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.footer-tagline {
  font-size: 14px;
  color: #a0b5c7;
  margin: 0;
  font-style: italic;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
  color: #6b7a8e;
  font-family: 'Courier New', monospace;
}

@media (max-width: 480px) {
  .game-header {
    padding: 20px 10px 15px;
  }
  
  .logo-text {
    font-size: 28px;
  }
  
  .tagline {
    font-size: 12px;
    letter-spacing: 2px;
  }
  
  #unity-loading-bar {
    padding: 20px 30px;
  }
  
  #unity-progress-bar-container {
    width: 220px;
  }
  
  .loading-text {
    font-size: 14px;
  }

  .security-tip {
    max-width: 300px;
    padding: 15px;
  }

  .tip-text {
    font-size: 12px;
  }

  .download-stats {
    max-width: 260px;
    padding: 10px 14px;
  }

  .download-stats-title {
    font-size: 10px;
  }

  .download-label {
    font-size: 10px;
  }

  .download-value {
    max-width: 140px;
    font-size: 10px;
  }

  .character-content {
    flex-direction: column;
    padding: 30px;
    gap: 30px;
  }

  .character-text h2 {
    font-size: 32px;
  }

  .character-subtitle {
    font-size: 16px;
  }

  .character-description {
    font-size: 14px;
  }

  .character-image {
    min-height: 300px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .cta-section {
    padding: 40px 25px;
    margin: 60px 20px;
  }

  .cta-section h2 {
    font-size: 28px;
  }

  .cta-section p {
    font-size: 16px;
  }

  .cta-button {
    padding: 15px 40px;
    font-size: 16px;
  }

  .contact-content {
    flex-direction: column;
    gap: 40px;
  }

  .footer-branding {
    text-align: left;
  }

  .footer-logo {
    font-size: 28px;
  }
}
