/* ==============================
   Ceylone Legends CSS Theme
============================== */

:root {
  /* Colors */
  --bg-dark: #0a0e14;
  --bg-darker: #06090c;
  --bg-alt: #0d121a;

  --primary-green: #00ff7f;
  /* Emerald Green */
  --primary-blue: #00f0ff;
  /* Diamond Blue */
  --discord-purple: #5865F2;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  /* Gradients */
  --gradient-main: linear-gradient(135deg, var(--primary-green), var(--primary-blue));

  /* Glow Effects */
  --glow-green: 0 0 15px rgba(0, 255, 127, 0.4), 0 0 30px rgba(0, 255, 127, 0.2);
  --glow-blue: 0 0 15px rgba(0, 240, 255, 0.4), 0 0 30px rgba(0, 240, 255, 0.2);
  --glow-purple: 0 0 15px rgba(88, 101, 242, 0.4), 0 0 30px rgba(88, 101, 242, 0.2);

  /* Structure */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 50px;

  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding: 100px 0;
}

.bg-alt {
  background-color: var(--bg-alt);
}

.text-green {
  color: var(--primary-green);
}

.text-blue {
  color: var(--primary-blue);
}

.text-muted {
  color: var(--text-muted);
}

.text-gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.glow-text-green {
  text-shadow: var(--glow-green);
}

.glow-text-blue {
  text-shadow: var(--glow-blue);
}

.text-center {
  text-align: center;
}

.relative {
  position: relative;
}

.z-10 {
  z-index: 10;
}

.w-full {
  width: 100%;
}

.col-span-full {
  grid-column: 1 / -1;
}

.pb-0 {
  padding-bottom: 0;
}

.mt-2 {
  margin-top: 10px;
}

.mt-4 {
  margin-top: 20px;
}

.small {
  font-size: 0.85rem;
}

/* Section Headers */
.section-header {
  margin-bottom: 60px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 10px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.title-divider {
  height: 4px;
  width: 60px;
  background: var(--gradient-main);
  margin: 15px auto;
  border-radius: var(--radius-pill);
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 30px;
}

/* Hover Lift */
.hover-lift {
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--primary-green);
  color: var(--bg-darker);
}

.btn-primary:hover {
  background-color: #00e673;
}

.glow-btn-green:hover {
  box-shadow: var(--glow-green);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
  background-color: rgba(0, 240, 255, 0.1);
}

.glow-btn-blue:hover {
  box-shadow: var(--glow-blue);
}

.btn-discord {
  background-color: var(--discord-purple);
  color: white;
}

.btn-discord:hover {
  background-color: #4752C4;
}

.glow-btn-purple:hover {
  box-shadow: var(--glow-purple);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  background: rgba(10, 14, 20, 0.8);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo-img {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  box-shadow: var(--glow-blue);
  object-fit: cover;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary-blue);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-mobile-menu {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Home Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('https://images.unsplash.com/photo-1605615712130-9b4dc50672e3?q=80&w=2560&auto=format&fit=crop');
  /* Placeholder Dark Forest/Mountain */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(10, 14, 20, 0.7) 0%, rgba(10, 14, 20, 1) 100%);
  z-index: 1;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
}

.badge {
  display: inline-block;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--primary-blue);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  letter-spacing: -2px;
}

.hero-subtitle {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Status Panel */
.status-section {
  position: relative;
  margin-top: -80px;
  padding-top: 0;
  padding-bottom: 60px;
}

.status-panel {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.status-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.server-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  object-fit: contain;
  background: #000;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.status-info-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-badge.online {
  color: var(--primary-green);
  background: rgba(0, 255, 127, 0.05);
  border: 1px solid rgba(0, 255, 127, 0.1);
}

.status-badge.offline {
  color: #ff4757;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
}

.online .pulse-dot {
  background: var(--primary-green);
  box-shadow: 0 0 10px var(--primary-green);
  animation: pulse 2s infinite;
}

.offline .pulse-dot {
  background: #ff4757;
  box-shadow: 0 0 10px #ff4757;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 127, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(0, 255, 127, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 127, 0);
  }
}

.motd-container {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 240, 255, 0.05));
  padding: 25px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.25rem;
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.motd-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
  z-index: 1;
}

.motd-container:hover {
  border-color: var(--primary-blue);
  box-shadow: var(--glow-blue);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 240, 255, 0.1));
}

.motd-text {
  line-height: 1.4;
  font-weight: 600;
  z-index: 2;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-box {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  padding: 30px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-box::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  transition: var(--transition);
  opacity: 0;
}

.stat-box:hover::after {
  opacity: 1;
  transform: translate(10%, 10%);
}

.stat-box:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary-blue);
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.stat-box i {
  font-size: 2rem;
  margin-bottom: 10px;
}

.stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Online Players List */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 30px;
}

.player-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 15px 10px;
  text-align: center;
  transition: var(--transition);
}

.player-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-blue);
  box-shadow: var(--glow-blue);
}

.player-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: #000;
  border-radius: 4px;
}

.player-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  text-align: center;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Rules */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.rule-card {
  display: flex;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.rule-card:hover {
  border-color: var(--primary-green);
  box-shadow: var(--glow-green);
  transform: translateX(10px);
}

.rule-number {
  background: rgba(0, 255, 127, 0.1);
  color: var(--primary-green);
  font-family: 'VT323', monospace;
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 25px;
  border-right: 1px solid var(--glass-border);
}

.rule-content {
  padding: 25px;
}

.rule-content h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.rule-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Discord */
.discord-large-icon {
  font-size: 4rem;
  color: var(--discord-purple);
  margin-bottom: 20px;
  text-shadow: var(--glow-purple);
}

.discord-card h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.discord-card p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.discord-large-btn {
  padding: 15px 40px;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--text-main);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-blue);
  padding-left: 5px;
}

.footer-contact p {
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
}

/* SweetAlert Dark Theme Override */
.swal2-popup.swal2-toast {
  background: var(--bg-card) !important;
  color: white !important;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-title {
    font-size: 4.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-dark);
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: none;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-mobile-menu {
    display: block;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .status-header {
    flex-direction: column;
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links a:hover {
    padding-left: 0;
  }

  .footer-contact p {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .rule-card {
    flex-direction: column;
  }

  .rule-number {
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    padding: 15px;
  }

  .players-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 2.8rem;
  }
}