:root {
  --neon: #00f2ff;
  --red: #ff3131;
  --glass: rgba(0, 0, 0, 0.8);
  --border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: #000;
  color: #fff;
  font-family: "Outfit", sans-serif;
  overflow-x: hidden;
}
/* Enable scrolling while keeping the HUD vibe */
body {
  background: #000;
  color: #fff;
  font-family: "Outfit", sans-serif;
  overflow-y: auto; /* ALLOW SCROLLING */
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom Alert Popup */
#custom-alert {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 0, 0, 0.95);
  border: 2px solid var(--red);
  padding: 30px;
  border-radius: 20px;
  z-index: 9999;
  text-align: center;
  box-shadow: 0 0 50px rgba(255, 49, 49, 0.4);
  backdrop-filter: blur(10px);
}

#custom-alert h2 {
  font-family: "Orbitron";
  color: var(--red);
  margin-bottom: 10px;
}
#custom-alert p {
  font-size: 0.9rem;
  margin-bottom: 20px;
  color: #fff;
}
#js-admin-clan-manage {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 5px;
}

/* Custom scrollbar for the admin list */
#js-admin-clan-manage::-webkit-scrollbar {
    width: 3px;
}
#js-admin-clan-manage::-webkit-scrollbar-thumb {
    background: var(--red);
}

.main-bg {
  position: fixed;
  inset: 0;
  background: url("images/meta.jpg") no-repeat center center/cover;
  filter: blur(15px);
  transform: scale(1.1);
  z-index: -2;
}
.vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, transparent 20%, #000 130%);
  z-index: -1;
}

.dashboard-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* GLOWING MASSIVE TITLE */
.main-header {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}
.massive-title {
  font-family: "Orbitron";
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1;
  text-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}
.massive-title span {
  color: var(--neon);
  -webkit-text-stroke: 1.5px var(--neon);
  color: transparent;
  margin-left: 10px;
  filter: drop-shadow(0 0 15px var(--neon));
}

.focus-grid {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 20px;
  flex: 1;
}

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 20px;
  margin-bottom: 20px;
  transition: 0.3s;
}
.glass-card:hover {
  border-color: var(--neon);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.15);
}


/* SIGNUP SECTION */
.center-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}
.signup-card {
  max-width: 500px;
  width: 100%;
  text-align: center;
  border: 1px solid rgba(0, 242, 255, 0.3);
}
.center-text {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 25px;
}
.action-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 30px;
  font-family: "Orbitron";
  font-weight: 900;
  font-size: 0.8rem;
  border-radius: 50px;
  cursor: pointer;
  transition: 0.3s;
  border: none;
}
.btn.primary {
  background: var(--neon);
  color: #000;
  box-shadow: 0 0 15px var(--neon);
}
.btn.secondary {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}
.btn:hover {
  transform: scale(1.05);
}

/* TABLES & BADGES */
table {
  width: 100%;
  border-collapse: collapse;
}
td {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: "Orbitron";
  font-size: 0.8rem;
}
.badge {
  background: rgba(255, 49, 49, 0.1);
  color: var(--red);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.6rem;
  font-weight: 900;
  margin: 3px;
  display: inline-block;
  border: 1px solid rgba(255, 49, 49, 0.2);
}

/* FOOTER */
.slim-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--neon);
  color: #000;
  padding: 8px 0;
  font-family: "Orbitron";
  font-weight: 900;
  font-size: 0.65rem;
  overflow: hidden;
}
/* Smooth Scrolling Ticker */
@keyframes ticker-swipe {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Works with the doubled text trick */
}

.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    background: var(--panel);
    border-top: 1px solid var(--border);
}

.ticker-content {
    display: inline-block;
    padding-left: 20px;
    animation: ticker-swipe 30s linear infinite;
    font-family: 'Orbitron', sans-serif;
    color: var(--cyan);
    font-size: 0.75rem;
    letter-spacing: 2px;
}
@keyframes scroll {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}
:root {
  --neon: #00f2ff;
  --red: #ff3131;
  --glass: rgba(0, 0, 0, 0.85);
  --border: rgba(255, 255, 255, 0.1);
}

/* ... (Keep previous body, bg, and title styles) ... */

/* NEWS FEED SPECIFIC */
.news-feed-card {
  height: 100%;
  max-height: 500px;
  display: flex;
  flex-direction: column;
}

.news-scroll {
  overflow-y: auto;
  padding-right: 10px;
}

.news-scroll::-webkit-scrollbar {
  width: 4px;
}
.news-scroll::-webkit-scrollbar-thumb {
  background: var(--neon);
  border-radius: 10px;
}

.news-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 15px 0;
}

.news-item h4 {
  font-family: "Orbitron";
  color: var(--neon);
  font-size: 0.8rem;
  margin-bottom: 5px;
}
.news-item p {
  font-size: 0.85rem;
  color: #ccc;
  line-height: 1.4;
}
.news-item small {
  color: #555;
  font-size: 0.7rem;
  text-transform: uppercase;
}

/* SIDEBAR BUTTONS */
.full {
  width: 100%;
  margin-bottom: 10px;
}
.signup-mini {
  border: 1px solid rgba(0, 242, 255, 0.2);
}

/* ... (Keep previous grid and card styles) ... */

/* ADMIN STYLES */
.admin-trigger {
  position: fixed;
  bottom: 40px;
  right: 20px;
  opacity: 0.2;
  cursor: pointer;
  z-index: 999;
  transition: 0.3s;
  font-size: 1.2rem;
}
.admin-trigger:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* --- MASTER ADMIN FIX --- */

.admin-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000;
}

.admin-box {
    width: 380px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid var(--neon);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.1);
}

/* LOGIN SPACING */
.admin-login-wrap {
    display: flex; flex-direction: column;
    align-items: center; gap: 40px; padding: 20px 0;
}

.secure-label {
    display: block; font-family: 'Orbitron'; font-size: 0.75rem;
    color: var(--neon); letter-spacing: 3px; margin-bottom: 20px;
    text-align: center;
}

/* SCROLL AREA FIX */
.admin-scroll-area {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 12px;
    margin: 15px 0;
}

.admin-scroll-area::-webkit-scrollbar { width: 4px; }
.admin-scroll-area::-webkit-scrollbar-thumb { background: var(--neon); border-radius: 10px; }


/* INPUT STYLING */
.control-group { margin-bottom: 20px; }

.admin-box label {
    display: block; font-family: 'Orbitron'; font-size: 2rem;
    color: #888; margin-bottom: 8px; text-transform: uppercase;
}

.admin-box input, .admin-box select, .admin-box textarea {
    width: 100%; background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white; padding: 12px; border-radius: 12px;
    font-family: 'Outfit'; outline: none;
}
/* Target the Admin Dashboard specifically */
#admin-dash h2 {
    font-size: 0.8rem; /* Shrink from that massive size */
    letter-spacing: 2px;
    margin-top: 25px;
    color: var(--neon);
    text-transform: uppercase;
}

#admin-dash .title {
    font-size: 1.1rem; /* The main heading */
    margin-bottom: 20px;
}

/* Shrink the input text and the buttons */
.admin-grid input, 
.admin-grid button {
    font-size: 0.75rem; 
    padding: 10px 15px; /* Less padding = smaller box */
    height: auto;
}

.admin-box input:focus { border-color: var(--neon); }

/* NEWS SUB-CARD */
.admin-sub-card {
    background: rgba(0, 242, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.1);
    padding: 15px; border-radius: 20px; margin: 20px 0;
}
.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px; /* Tighten the spacing */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 5px;
}

.news-item span {
    font-size: 0.7rem; /* Smaller news text */
    font-family: 'Outfit';
}

.del-btn {
    font-size: 0.5rem; /* Tiny delete button */
    padding: 4px 8px;
    border-radius: 4px;
}
.neon-label { color: var(--neon) !important; font-weight: 900; }

/* BUTTONS */
.glow-btn {
    width: 90%; background: #fff; color: #000;
    font-family: 'Orbitron'; font-weight: 900; padding: 18px;
    border-radius: 50px; border: none; cursor: pointer;
    box-shadow: 0 0 20px #fff; transition: 0.3s;
}

.glow-btn-small {
    width: 100%; background: var(--neon); color: #000;
    font-family: 'Orbitron'; font-weight: 900; padding: 10px;
    border-radius: 10px; border: none; margin-top: 10px;
}

.danger-btn {
    font-size: 0.7rem;
    letter-spacing: 1px;
    padding: 10px;
    background: transparent;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
}

.danger-btn:hover {
    background: #ff4d4d;
    color: white;
}
.btn-close {
    width: 100%; background: transparent; border: 1px solid #333;
    color: #555; padding: 10px; border-radius: 50px;
    font-family: 'Orbitron'; margin-top: 10px; cursor: pointer;
}
/* ADMIN CONTROLS SCROLLBAR */
#controls-section::-webkit-scrollbar { width: 4px; }
#controls-section::-webkit-scrollbar-thumb { background: var(--neon); border-radius: 10px; }
/* ... (Keep your existing admin styles) ... */

/* Hide admin buttons by default */
.admin-only-btn {
    display: none !important;
}

/* Show buttons ONLY when admin is logged in */
body.is-admin .admin-only-btn {
    display: inline-block !important;
}

/* News management list styling */
.news-manage-list {
  margin-top: 10px;
  max-height: 120px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 5px;
  border: 1px solid var(--border);
}

.news-manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.news-manage-item span {
  font-size: 0.65rem;
  color: #ccc;
  font-family: "Orbitron";
}

.del-news-btn {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 0.5rem;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 4px;
}

.del-news-btn:hover {
  background: var(--red);
  color: white;
}
/* New Spacing Classes */
.admin-login-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px; /* This creates the space between Input and Button */
    padding: 20px 0;
}

.admin-input-group {
    width: 100%;
    text-align: center;
}

.secure-label {
    display: block !important;
    font-family: 'Orbitron';
    font-size: 0.7rem !important;
    color: var(--neon) !important;
    margin-bottom: 20px !important; /* Space between Label and Input Box */
    letter-spacing: 3px;
    opacity: 1 !important;
}

/* The White Glow Button Style */
.glow-btn {
    background: #fff !important; 
    color: #000 !important;
    font-weight: 900;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    border-radius: 50px !important;
    border: none !important;
}

.btn-text {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Orbitron';
    font-size: 0.6rem;
    cursor: pointer;
}
/* --- RESPONSIVE ENGINE --- */

/* 1. Fix the Layout Grid */
@media (max-width: 1200px) {
  .focus-grid {
    grid-template-columns: 1fr 1fr; /* Two columns for tablets */
    gap: 15px;
  }
  .center-content {
    grid-column: span 2; /* News takes full width at top/middle */
    order: -1; /* Puts News at the very top of the grid */
  }
}

@media (max-width: 768px) {
  .dashboard-wrapper {
    padding: 15px;
    overflow-y: auto; /* Allow scrolling on mobile */
  }

  .focus-grid {
    grid-template-columns: 1fr; /* Stack everything in 1 column */
  }

  .center-content {
    grid-column: span 1;
  }

  /* 2. Fix the Massive Title */
  .massive-title {
    font-size: 3.5rem; /* Shrink title so it fits phone screens */
    letter-spacing: -2px;
  }

  /* 3. Adjust Glass Cards */
  .glass-card {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 20px; /* Slightly tighter corners for small screens */
  }

  /* 4. Fix Tables (Leaderboard) */
  .leaderboard table td {
    font-size: 0.75rem; /* Smaller text for small screens */
    padding: 8px 4px;
  }

  /* 5. Admin Panel (Make it fill the screen) */
  .admin-box {
    width: 90%;
    margin: 10px;
  }
}

/* 6. Fix for very small phones */
@media (max-width: 480px) {
  .massive-title {
    font-size: 2.5rem;
  }
  .btn {
    width: 100%; /* Buttons stack on mobile */
    padding: 10px;
  }
}

/* --- MOBILE RESPONSIVE OVERRIDES --- */
@media (max-width: 900px) {
    .hub-layout {
        display: flex;
        flex-direction: column; /* Stacks Left, Center, Right panels */
        gap: 20px;
        padding: 10px;
    }


    /* Adjust Admin Panel for touch screens */
    .admin-box {
        width: 95% !important;
        max-width: 340px;
    }

    /* Make news text slightly larger for readability on phones */
    .news-item p {
        font-size: 0.85rem !important;
        text-align: left !important;
    }

    /* Hide non-essential desktop decorations to save space */
    .status-indicator span {
        font-size: 0.6rem;
    }
}

body {
    overflow-x: hidden; /* Prevents the site from wobbling left/right on mobile */
    width: 100%;
}

.ticker-wrap {
    display: inline-block;
    white-space: nowrap;
    animation: scroll 15s linear infinite;
}

@keyframes scroll {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

/* --- THE ULTIMATE MOBILE REPAIR --- */
@media (max-width: 950px) {
    /* 1. Reset the main layout from 3-columns to 1-column stack */
    .hub-layout {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        padding: 15px !important;
        width: 100% !important;
        box-sizing: border-box;
    }


  

    /* 3. Fix the News Feed layout so it doesn't squish */
    .news-item {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 2px;
        padding: 15px 0 !important;
    }

    .news-item p {
        text-align: left !important;
        width: 100%;
    }

    /* 4. Ensure the Footer Ticker doesn't cause horizontal scrolling */
    body, html {
        overflow-x: hidden !important;
        position: relative;
    }

    /* 5. Scale down the fonts slightly so headers don't wrap weirdly */
    .tag { font-size: 0.5rem !important; }
    h4 { font-size: 0.7rem !important; }
}