/* ---------- GLOBAL ---------- */
* { box-sizing: border-box; }
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Arial', sans-serif;
    color: #fff;
    background: url('https://cdn.mrejata.eu/img/default_scard_bg.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Body padding to account for fixed header */
body {
    padding-top: 160px; /* Adjust according to your header's actual height */
}


/* ---------- HEADER ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 40px;
    box-sizing: border-box;
}

.logo-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 64px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    color: #ffa500;
}

.header-bottom {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-bottom h1 {
    font-size: 22px;
    margin: 0;
}

.server-input {
    display: flex;
    gap: 6px;
}

.server-input input {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #1f2937;
    background: #0d1117;
    color: #fff;
}

.server-input button {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: #5865f2;
    color: #fff;
    cursor: pointer;
}

/* ---------- GAME GRID ---------- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    width: 90%;
    margin-top: 30px;
    box-sizing: border-box;
}

/* ---------- SERVER CARD ---------- */
.server-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.server-card:hover {
    transform: translateY(-3px);
}

.server-card-overlay {
    background: rgba(0, 0, 0, 0.65);
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.server-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.server-top img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #000;
}

.server-name {
    font-size: 18px;
    font-weight: 600;
}

.server-meta {
    margin-top: 8px;
    font-size: 14px;
    color: #e5e7eb;
}

.server-links {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.server-links a {
    color: #ffa500;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #ffa500;
    padding: 4px 8px;
    border-radius: 5px;
    transition: 0.3s;
}

.server-links a:hover {
    background: #ffa500;
    color: #000;
}

/* ---------- AD CONTAINER ---------- */
.ad-container {
    border: 2px solid #ccc;
    padding: 8px;
    text-align: center;
    margin: 10px auto;
    max-width: 728px;
    border-radius: 6px;
}

.ad-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.ad-container a.ad-link {
    margin-top: 6px;
    font-size: 0.9rem;
    color: #007BFF;
    text-decoration: none;
    display: inline-block;
}

.ad-container a.ad-link:hover {
    text-decoration: underline;
}

/* ---------- FOOTER ---------- */
.footer {
    bottom: 0;
    left: 0;
    width: 90%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    color: #fff;
    box-sizing: border-box;
}

.footer .copyright {
    font-size: 14px;
}

.footer .social-icons {
    display: flex;
    gap: 20px;
}

.footer .social-icons a {
    color: #fff;
    font-size: 24px;
    text-decoration: none;
}

.footer .social-icons a:hover {
    color: #ffa500;
}

.footer .copyright,
.footer .copyright a,
.footer .copyright a:visited,
.footer .copyright a:hover,
.footer .copyright a:active,
.footer .copyright a:focus {
    font-size: 14px;
    color: inherit;
    text-decoration: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ad-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }
    .header .logo img {
        width: 50px;
    }
    .header .nav-links {
        flex-wrap: wrap;
        gap: 10px;
    }
    .header .nav-links a {
        font-size: 14px;
    }
    .game-grid {
        grid-template-columns: 1fr;
    }
    .server-card-overlay {
        padding: 12px;
    }
    .server-top img {
        width: 36px;
        height: 36px;
    }
    .server-name {
        font-size: 16px;
    }
    .server-links a {
        font-size: 12px;
        padding: 3px 6px;
    }
    .ad-container {
        height: auto;
        margin: 10px;
    }
}

/* ---------- MODERN PAGE LOADER ---------- */
:root {
  --loader-bg: #2c3e50;
  --loader-size: 60px;
  --loader-font: 'Arial', sans-serif;
}

.o-page-loader {
  position: fixed;
  inset: 0;
  background: var(--loader-bg);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.o-page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.o-page-loader--spinner {
  width: var(--loader-size);
  height: var(--loader-size);
  margin-bottom: 16px;
  animation: rotate-plane 1.2s infinite ease-in-out;
  transform-style: preserve-3d;
  object-fit: contain;
}

@keyframes rotate-plane {
  0% { transform: perspective(120px) rotateX(0deg) rotateY(0deg); }
  50% { transform: perspective(120px) rotateX(-180deg) rotateY(0deg); }
  100% { transform: perspective(120px) rotateX(-180deg) rotateY(-180deg); }
}

.o-page-loader--message {
  color: #ffffff;
  font-weight: bold;
  font-size: 1.125rem;
  font-family: var(--loader-font);
  text-align: center;
}

a:link {
  text-decoration: none;
}

a:visited {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

a:active {
  text-decoration: none;
}
