/* ==========================================================================
   Duh Beat Games | Dedicated Game Servers Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page Intro Section
   -------------------------------------------------------------------------- */
.page-intro {
  text-align: center;
  padding-bottom: 20px;
}

.page-intro h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.page-intro p {
  color: var(--text-muted, #a0a0a0);
}

/* --------------------------------------------------------------------------
   2. Servers Container & Base Card
   -------------------------------------------------------------------------- */
.servers-list {
  display: flex;
  flex-direction: column; /* Stack cards vertically line-by-line */
  align-items: center;    /* Center the 3/5 width cards horizontally */
  gap: 2rem;              /* Vertical spacing between stacked servers */
  width: 100%;
  margin-top: 2rem;
}

/* Establishes stacking context & clips pseudo-element background artwork */
.server-card {
  width: 60%;             /* 3/5 of the parent page width */
  max-width: 800px;       /* Keeps cards comfortable on ultra-wide screens */
  min-width: 320px;       /* Prevents clipping on smaller mobile screens */
  height: auto;           /* Flexible height based on content */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background-color: var(--bg-card, rgba(20, 20, 25, 0.85));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 1;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.server-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

/* Semi-Transparent Game Background Overlay Base */
.server-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.18; 
  filter: brightness(0.7) contrast(1.1); 
  z-index: -1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hover Effect: Brightens background artwork slightly */
.server-card:hover::before {
  opacity: 0.28;
  transform: scale(1.02);
}

/* --------------------------------------------------------------------------
   3. Top Accent Borders & Theme Background Art
   -------------------------------------------------------------------------- */
/* Cobblemon Theme */
.cobblemon-theme { border-top: 4px solid #64b5f6; }
.cobblemon-theme::before { background-image: url('../img/cobblemon-bg.png'); }

/* Project Zomboid Theme */
.zomboid-theme { border-top: 4px solid #e57373; }
.zomboid-theme::before { background-image: url('../img/zomboid-bg.jpg'); }

/* Vanilla / Modded Minecraft Theme */
.minecraft-theme { border-top: 4px solid #81c784; }
.minecraft-theme::before { background-image: url('../img/minecraft-bg.jpg'); }

/* Terraria Theme */
.terraria-theme { border-top: 4px solid #ba68c8; }
.terraria-theme::before { background-image: url('../img/terraria-bg.jpg'); }

/* Palworld / Survival RPG Theme */
.palworld-theme { border-top: 4px solid #ffd54f; }
.palworld-theme::before { background-image: url('../img/palworld-bg.jpg'); }

/* Default Fallback Server Theme */
.default-theme { border-top: 4px solid var(--accent-gold, #f5c518); }
.default-theme::before { background-image: url('../img/server-bg-default.jpg'); }

/* --------------------------------------------------------------------------
   4. Header, Badges & Status Indicators
   -------------------------------------------------------------------------- */
.server-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.server-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Badge Color Variations */
.badge-cobblemon { background-color: #1a365d; color: #90caf9; }
.badge-zomboid   { background-color: #4a1212; color: #ef9a9a; }
.badge-minecraft { background-color: #1b431e; color: #a5d6a7; }
.badge-terraria  { background-color: #3b124d; color: #e1bee7; }
.badge-palworld  { background-color: #4a3b12; color: #ffe082; }
.badge-default   { background-color: #2a2a2a; color: var(--accent-gold, #f5c518); }

/* Status Indicators */
.status-indicator {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Online State */
.status-indicator.online {
  color: #81c784;
}

.status-indicator.online .dot {
  width: 8px;
  height: 8px;
  background-color: #4caf50;
  border-radius: 50%;
  box-shadow: 0 0 8px #4caf50;
}

/* Offline / Maintenance State */
.status-indicator.offline {
  color: #e57373;
}

.status-indicator.offline .dot {
  width: 8px;
  height: 8px;
  background-color: #f44336;
  border-radius: 50%;
  box-shadow: 0 0 8px #f44336;
}

/* --------------------------------------------------------------------------
   5. Card Body Typography
   -------------------------------------------------------------------------- */
.server-title {
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.server-tagline {
  font-size: 1rem;
  color: var(--accent-gold, #f5c518);
  font-weight: 600;
  margin-bottom: 12px;
}

.server-description {
  color: var(--text-light, #cccccc);
  line-height: 1.6;
  font-size: 0.98rem;
  margin: 0.5rem 0 1.5rem 0;
  word-wrap: break-word;
  height: auto;
  overflow: visible;
}

/* --------------------------------------------------------------------------
   6. Frosted Glass IP Copy Footer
   -------------------------------------------------------------------------- */
.server-card-footer {
  background-color: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ip-copy-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ip-label {
  font-size: 0.85rem;
  color: var(--text-muted, #888888);
  font-weight: 600;
}

.ip-box {
  display: flex;
  gap: 10px;
}

.ip-input {
  flex-grow: 1;
  background-color: #0d0d0d;
  border: 1px solid #333;
  color: #81c784;
  font-family: monospace;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease;
}

.ip-input:focus {
  border-color: var(--accent-gold, #f5c518);
}

.copy-btn {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   7. Responsive Design Adjustments
   -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
  .server-card {
    width: 100%; /* Expands to full width on tablet & mobile devices */
    padding: 18px;
  }

  .server-title {
    font-size: 1.5rem;
  }

  .ip-box {
    flex-direction: column;
  }

  .copy-btn {
    width: 100%;
  }
}