/* ==================== GENERAL RESET & VARIABLES ==================== */
:root {
  --bg-color: #0b0619;
  --panel-bg: rgba(18, 10, 36, 0.45);
  --panel-border: rgba(255, 255, 255, 0.07);
  --panel-border-focus: rgba(139, 92, 246, 0.4);
  
  --primary-color: #8b5cf6; /* Medium Purple */
  --primary-glow: rgba(139, 92, 246, 0.5);
  --secondary-color: #06b6d4; /* Cyan */
  --secondary-glow: rgba(6, 182, 212, 0.5);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-accent: #c084fc;
  
  --font-family-title: 'Outfit', sans-serif;
  --font-family-body: 'Inter', sans-serif;
  
  --transition-speed: 0.3s;
  --border-radius: 16px;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family-body);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* ==================== BACKGROUND GLOW EFFECTS ==================== */
.stars-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 20%, rgba(31, 16, 68, 0.4), transparent 45%),
              radial-gradient(circle at 80% 70%, rgba(13, 37, 72, 0.35), transparent 50%);
  z-index: -3;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -2;
  opacity: 0.25;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-color);
  top: -100px;
  right: 10%;
  animation: floatOrb1 15s infinite alternate ease-in-out;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: var(--secondary-color);
  bottom: -100px;
  left: 10%;
  animation: floatOrb2 12s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(50px) scale(1.1); }
}

@keyframes floatOrb2 {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-40px) scale(1.15); }
}

/* ==================== LAYOUT CONTAINER ==================== */
.app-container {
  display: flex;
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ==================== LEFT SIDEBAR ==================== */
.sidebar {
  width: 280px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--panel-border);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  font-family: var(--font-family-title);
}

.brand-star {
  font-size: 28px;
  color: var(--secondary-color);
  text-shadow: 0 0 10px var(--secondary-glow);
}

.brand-text {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-section {
  margin-bottom: 30px;
}

.steam-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--border-radius);
  border: 1px solid #171a21;
  background: linear-gradient(135deg, #171a21 0%, #1b2838 100%);
  color: #c5c3c0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-family-title);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-speed) ease;
}

.steam-btn i {
  font-size: 18px;
  color: #1078ff;
}

.steam-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 120, 255, 0.25);
  border-color: #1078ff;
  color: #fff;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  text-align: left;
}

.nav-item i {
  font-size: 18px;
  width: 20px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  padding-left: 20px;
}

.nav-item.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 15px rgba(139, 92, 246, 0.1);
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.nav-item.active i {
  color: var(--text-accent);
}

.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid var(--panel-border);
}

.social-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 12px;
}

.social-links a {
  color: var(--text-muted);
  font-size: 20px;
  transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.social-links a:hover {
  color: var(--secondary-color);
  transform: scale(1.15);
}

.copyright {
  font-size: 11px;
  color: rgba(156, 163, 175, 0.5);
  text-align: center;
}

/* ==================== MAIN CONTENT AREA ==================== */
.main-content {
  flex-grow: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: calc(100% - 280px);
}

/* ==================== TOPBAR ==================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--panel-border);
}

.topbar h1 {
  font-family: var(--font-family-title);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.server-status-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  padding: 8px 16px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981; /* Green */
  box-shadow: 0 0 10px #10b981;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* ==================== CARD STYLING ==================== */
.card {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-speed) ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* ==================== TAB HOME ==================== */
.server-card {
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: linear-gradient(135deg, rgba(35, 17, 75, 0.5) 0%, rgba(11, 6, 25, 0.8) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.15);
  margin-bottom: 10px;
}

.server-card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
  gap: 20px;
}

.server-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--secondary-color);
  text-shadow: 0 0 5px var(--secondary-glow);
  display: inline-block;
  margin-bottom: 8px;
}

.server-info-main h2 {
  font-family: var(--font-family-title);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.server-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.meta-item i {
  color: var(--primary-color);
}

.server-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.ip-display {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.ip-address {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #fff;
}

.ip-copy-btn {
  background: transparent;
  border: none;
  color: var(--secondary-color);
  font-size: 16px;
  cursor: pointer;
}

.ip-display:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.ip-hint {
  font-size: 11px;
  color: rgba(156, 163, 175, 0.4);
}

.server-card-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.22), transparent 70%);
  z-index: 1;
}

.home-grids {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.feature-box h3 {
  font-family: var(--font-family-title);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.feature-box h3 i {
  color: var(--secondary-color);
}

.feature-box p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.players-online-container {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 6px;
}

.players-online-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-online-item {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  color: var(--text-main);
}

.player-online-rank {
  color: var(--text-accent);
  font-size: 11px;
  font-weight: 600;
}

.empty-list-item {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
}

/* ==================== STATS TAB / TABLES ==================== */
.table-card {
  padding: 0;
  overflow: hidden;
}

.table-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--panel-border);
}

.table-header h2 {
  font-family: var(--font-family-title);
  font-size: 20px;
  font-weight: 600;
}

.search-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 250px;
  transition: border-color var(--transition-speed) ease;
}

.search-box i {
  color: var(--text-muted);
  font-size: 14px;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  outline: none;
  width: 100%;
}

.search-box:focus-within {
  border-color: var(--panel-border-focus);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.stats-table th {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--panel-border);
}

.stats-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--panel-border);
  font-size: 14px;
  color: var(--text-main);
}

.stats-table tbody tr:last-child td {
  border-bottom: none;
}

.stats-table tbody tr {
  transition: background-color 0.2s ease;
}

.stats-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.015);
}

.loading-td {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
}

.ban-status {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.ban-status.active {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.ban-status.expired {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ==================== DONATE TAB ==================== */
.donate-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
}

.donate-form-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.form-group input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-speed) ease;
}

.form-group input:focus {
  border-color: var(--panel-border-focus);
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.field-hint code {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--text-accent);
}

.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.method-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.method-item img {
  height: 20px;
}

.method-logo-text {
  font-family: var(--font-family-title);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.method-logo-text i {
  font-size: 14px;
}

.method-item span {
  font-size: 11px;
  color: var(--text-muted);
}

.method-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

.method-item.active {
  border-color: var(--secondary-color);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.method-item.active span {
  color: var(--secondary-color);
  font-weight: 600;
}

.action-btn {
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-family: var(--font-family-title);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-speed) ease;
}

.pay-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.45);
  filter: brightness(1.1);
}

.donate-terms {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

.donate-terms a {
  color: var(--text-accent);
  text-decoration: none;
}

.donate-terms a:hover {
  text-decoration: underline;
}

.privileges-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.privilege-cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.privilege-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius);
  padding: 20px;
  transition: all var(--transition-speed) ease;
}

.priv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.priv-badge {
  font-family: var(--font-family-title);
  font-size: 14px;
  font-weight: 800;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: #fff;
}

.priv-price {
  font-family: var(--font-family-title);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.priv-price span {
  font-size: 12px;
  color: var(--text-muted);
}

.privilege-card h3 {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.privilege-card ul {
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.privilege-card ul i {
  color: #10b981; /* Green */
  margin-right: 6px;
}

.privilege-card:hover {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.privilege-card.premium {
  border-color: rgba(6, 182, 212, 0.25);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.04) 0%, rgba(0, 0, 0, 0) 100%);
}

.privilege-card.premium:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.privilege-card.premium .priv-badge {
  background: var(--secondary-color);
  color: #000;
}

.privilege-card.creator {
  border-color: rgba(139, 92, 246, 0.25);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.04) 0%, rgba(0, 0, 0, 0) 100%);
}

.privilege-card.creator:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

.privilege-card.creator .priv-badge {
  background: var(--primary-color);
  color: #fff;
}

/* ==================== RULES TAB ==================== */
.rules-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rule-group {
  padding: 0;
  overflow: hidden;
}

.rule-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.01);
  transition: background-color var(--transition-speed) ease;
}

.rule-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.rule-header h3 {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.rule-header i {
  color: var(--text-muted);
  transition: transform var(--transition-speed) ease;
}

.rule-group.open .rule-header i {
  transform: rotate(180deg);
  color: var(--secondary-color);
}

.rule-content {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), padding 0.4s ease;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.rule-group.open .rule-content {
  padding: 16px 24px 24px 24px;
  max-height: 1000px;
  border-top: 1px solid var(--panel-border);
}

.rule-content p {
  margin-bottom: 12px;
}

.rule-content p:last-child {
  margin-bottom: 0;
}

.rule-content strong {
  color: #f87171; /* Red accents for punishment */
}

/* ==================== TAB VISIBILITY ==================== */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
  display: block;
}

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

/* ==================== NOTIFICATION ==================== */
.notification {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification.show {
  bottom: 30px;
}

.notification-content {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid var(--secondary-color);
  backdrop-filter: blur(12px);
  padding: 12px 24px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
}

.notification-content i {
  color: var(--secondary-color);
  font-size: 16px;
}

/* ==================== RESPONSIVE LAYOUT ==================== */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 24px;
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
  }
  
  .main-content {
    max-width: 100%;
    padding: 24px;
  }
  
  .donate-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
  }
  
  .nav-item {
    width: auto;
    font-size: 14px;
    padding: 10px 14px;
  }
  
  .auth-section {
    position: absolute;
    top: 24px;
    right: 24px;
    margin-bottom: 0;
    width: auto;
  }
  
  .steam-btn {
    width: auto;
    padding: 10px 16px;
  }
  
  .social-links, .copyright {
    display: none;
  }
}

@media (max-width: 768px) {
  .home-grids {
    grid-template-columns: 1fr;
  }
  
  .payment-methods {
    grid-template-columns: 1fr;
  }
  
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .auth-section {
    position: static;
    margin: 10px 0;
    width: 100%;
  }
  
  .steam-btn {
    width: 100%;
  }
  
  .nav-menu {
    width: 100%;
  }
}
