/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark theme color palette */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #707070;

  /* Gradient colors */
  --mine-start: #55ffff;
  --mine-end: #00aaaa;
  --sion-start: #ff5555;
  --sion-end: #aa0000;

  /* Minecraft interface colors */
  --mc-java-bg: #313233;
  --mc-java-border: #000000;
  --mc-bedrock-bg: #2b2b2b;
  --mc-bedrock-accent: #3d3d3d;

  /* Status colors */
  --status-online: #55ff55;
  --status-offline: #ff5555;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
  /* Increased z-index significantly to prevent any overlap */
  z-index: 100;
}

/* Added Minecraft build background image behind logo */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("https://minesion.net/img/fondo.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.25;
  z-index: 1;
  pointer-events: none;
}

/* Grid overlay moved to ::after to layer on top of background image */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.03) 2px,
      rgba(255, 255, 255, 0.03) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.03) 2px,
      rgba(255, 255, 255, 0.03) 4px
    );
  z-index: 2;
  pointer-events: none;
}

/* Ensured container stays above all background layers */
.hero .container {
  position: relative;
  z-index: 3;
}

.logo {
  max-width: 400px;
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
  animation: float 3s ease-in-out infinite;
}

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

.title {
  font-family: "Press Start 2P", cursive;
  font-size: clamp(1.5rem, 5vw, 3rem);
  margin-bottom: 1rem;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
}

.mine-gradient {
  background: linear-gradient(135deg, var(--mine-start) 0%, var(--mine-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sion-gradient {
  background: linear-gradient(135deg, var(--sion-start) 0%, var(--sion-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 3rem;
}

/* Added hero buttons container and button styles */
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-btn {
  font-family: "Press Start 2P", cursive;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.8rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.hero-btn:active {
  transform: translateY(-1px);
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Store button - smaller, left side */
/* Softened orange to more muted amber/gold tones */
.btn-store {
  background: linear-gradient(135deg, #cc8800, #996600);
  color: var(--text-primary);
  border-color: #996600;
}

.btn-store:hover {
  background: linear-gradient(135deg, #e69500, #b37700);
  box-shadow: 0 8px 25px rgba(204, 136, 0, 0.3);
}

/* Play button - largest, center */
/* Reduced brightness of cyan gradient for less aggressive appearance */
.btn-play {
  background: linear-gradient(135deg, #33cccc, #008888);
  color: var(--text-primary);
  border-color: #008888;
  padding: 1.5rem 3rem;
  font-size: 1rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

.btn-play:hover {
  background: linear-gradient(135deg, #44dddd, #009999);
  box-shadow: 0 8px 30px rgba(51, 204, 204, 0.4);
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 4px 15px rgba(51, 204, 204, 0.3);
  }
  50% {
    box-shadow: 0 4px 25px rgba(51, 204, 204, 0.5);
  }
}

/* Discord button - smaller, right side */
/* Darkened Discord purple for less visual intensity */
.btn-discord {
  background: #4752c4;
  color: var(--text-primary);
  border-color: #3a42a0;
}

.btn-discord:hover {
  background: #5562d8;
  box-shadow: 0 8px 25px rgba(71, 82, 196, 0.3);
}

/* Game Modes Section */
.game-modes {
  padding: 6rem 0;
  background-color: var(--bg-secondary);
  /* Set lower z-index to ensure it stays behind hero section */
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: "Press Start 2P", cursive;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 3rem;
  text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.mode-card {
  background: var(--bg-tertiary);
  border: 3px solid var(--bg-primary);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mode-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

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

.mode-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mode-card.coming-soon {
  opacity: 0.7;
}

.mode-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.mode-title {
  font-family: "Press Start 2P", cursive;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.mode-version {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-family: "Press Start 2P", cursive;
  font-size: 0.7rem;
}

.mode-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.mode-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-family: "Press Start 2P", cursive;
  font-size: 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.mode-badge.available {
  background: linear-gradient(135deg, var(--mine-start), var(--mine-end));
  color: var(--bg-primary);
}

.mode-badge.soon {
  background: linear-gradient(135deg, var(--sion-start), var(--sion-end));
  color: var(--text-primary);
}

/* Server Connection Section */
.server-connection {
  padding: 6rem 0;
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

/* Added dirt texture background image */
.server-connection::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("https://minesion.net/img/minecraft.webp");
  /* Changed from 400px to auto to display texture at natural size without stretching */
  background-size: auto;
  background-repeat: repeat;
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

/* Ensure content stays above background */
.server-connection .container {
  position: relative;
  z-index: 1;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tab-button {
  font-family: "Press Start 2P", cursive;
  font-size: 0.8rem;
  padding: 1rem 2rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 3px solid var(--bg-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-button:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.tab-button.active {
  background: linear-gradient(135deg, var(--mine-start), var(--mine-end));
  color: var(--bg-primary);
  border-color: var(--mine-end);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Minecraft Interface Styling */
.minecraft-interface {
  max-width: 800px;
  margin: 0 auto;
  border: 4px solid var(--mc-java-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.java-interface {
  background: var(--mc-java-bg);
}

.bedrock-interface {
  background: var(--mc-bedrock-bg);
}

.interface-header {
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.8);
}

.interface-title {
  font-family: "Press Start 2P", cursive;
  font-size: 1rem;
  color: var(--text-primary);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8);
}

.server-info {
  padding: 2rem;
}

.server-details {
  margin-bottom: 2rem;
}

.server-name {
  font-family: "Press Start 2P", cursive;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8);
}

.server-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background: var(--status-online);
  box-shadow: 0 0 10px var(--status-online);
  animation: pulse 2s ease-in-out infinite;
}

/* Added offline status styling */
.status-dot.offline {
  background: var(--status-offline);
  box-shadow: 0 0 10px var(--status-offline);
}

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

.server-ip-section {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  border: 2px solid rgba(0, 0, 0, 0.5);
}

.ip-label {
  font-family: "Press Start 2P", cursive;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.ip-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.ip-display:last-child {
  margin-bottom: 0;
}

.ip-text {
  font-family: "Press Start 2P", cursive;
  font-size: 0.9rem;
  color: var(--mine-start);
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8);
}

.copy-button {
  font-family: "Press Start 2P", cursive;
  font-size: 0.7rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--mine-start), var(--mine-end));
  color: var(--bg-primary);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.copy-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(85, 255, 255, 0.4);
}

.copy-button:active {
  transform: scale(0.95);
}

.copied-text {
  display: none;
}

.copy-button.copied .copy-text {
  display: none;
}

.copy-button.copied .copied-text {
  display: inline;
}

.copy-button.copied {
  background: linear-gradient(135deg, var(--status-online), #00aa00);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  padding: 2rem 0;
  text-align: center;
  border-top: 3px solid var(--bg-primary);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .logo {
    max-width: 280px;
  }

  .title {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  /* Added responsive styles for hero buttons on mobile */
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .hero-btn {
    width: 100%;
    justify-content: center;
    padding: 1.25rem 2rem;
  }

  .btn-play {
    padding: 1.5rem 2rem;
  }

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

  .tabs {
    flex-direction: column;
  }

  .tab-button {
    width: 100%;
  }

  .ip-display {
    flex-direction: column;
    gap: 1rem;
  }

  .copy-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.2rem;
  }

  .mode-title {
    font-size: 1rem;
  }

  .server-name {
    font-size: 1rem;
  }

  /* Adjusted button font size for very small screens */
  .hero-btn {
    font-size: 0.7rem;
  }

  .btn-play {
    font-size: 0.8rem;
  }
}
