@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: #fff;
    overflow-x: hidden;
}

.ocean-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg,
        #020b18 0%, #041428 15%, #062040 35%,
        #083050 55%, #0a3d63 75%, #0d4f7a 100%);
    z-index: 0;
    overflow: hidden;
}

.deep-glow {
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 120%; height: 60%;
    background: radial-gradient(ellipse at 50% 100%,
        rgba(0,180,255,0.1) 0%, rgba(0,100,200,0.06) 40%, transparent 70%);
    pointer-events: none;
}

.stars { position: absolute; inset: 0; pointer-events: none; }
.star {
    position: absolute; border-radius: 50%;
    background: #fff;
    animation: starTwinkle var(--dur) ease-in-out infinite var(--delay);
}
@keyframes starTwinkle {
    0%,100% { opacity: var(--min-op); transform: scale(1); }
    50% { opacity: var(--max-op); transform: scale(1.4); }
}

.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble {
    position: absolute; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03);
    animation: bubbleRise var(--dur) ease-in infinite var(--delay);
    bottom: -20px;
}
@keyframes bubbleRise {
    0% { transform: translateX(0) translateY(0); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.2; }
    100% { transform: translateX(var(--drift)) translateY(-110vh); opacity: 0; }
}

.waves-wrap { position: absolute; bottom: 0; left: 0; right: 0; height: 120px; pointer-events: none; }
.wave { position: absolute; bottom: 0; left: 0; width: 100%; height: 120px; }
.wave1 { fill: rgba(0,150,220,0.1); animation: waveDrift 7s ease-in-out infinite; }
.wave2 { fill: rgba(0,100,180,0.07); animation: waveDrift 11s ease-in-out infinite reverse; }
@keyframes waveDrift {
    0%,100% { transform: translateX(0); }
    50% { transform: translateX(-30px); }
}

.fish { position: absolute; font-size: 20px; pointer-events: none; filter: drop-shadow(0 0 5px rgba(0,200,255,0.3)); }
.fish1 { bottom: 16%; animation: fishSwim1 20s linear infinite; }
.fish2 { bottom: 10%; font-size: 15px; animation: fishSwim2 26s linear infinite 8s; }
@keyframes fishSwim1 {
    0%   { left:-50px; transform:scaleX(1); }
    49%  { left:110%; transform:scaleX(1); }
    50%  { left:110%; transform:scaleX(-1); }
    99%  { left:-50px; transform:scaleX(-1); }
    100% { left:-50px; transform:scaleX(1); }
}
@keyframes fishSwim2 {
    0%   { right:-50px; left:auto; transform:scaleX(-1); }
    49%  { right:110%; left:auto; transform:scaleX(-1); }
    50%  { right:110%; left:auto; transform:scaleX(1); }
    99%  { right:-50px; left:auto; transform:scaleX(1); }
    100% { right:-50px; left:auto; transform:scaleX(-1); }
}

.jellyfish { position: absolute; pointer-events: none; filter: drop-shadow(0 0 8px rgba(150,100,255,0.5)); animation: jellyFloat var(--jdur,6s) ease-in-out infinite var(--jdelay,0s); }
.jelly1 { font-size: 26px; bottom: 28%; left: 6%; --jdur:5s; }
.jelly2 { font-size: 18px; bottom: 18%; right: 8%; --jdur:7s; --jdelay:2s; opacity:.7; }
@keyframes jellyFloat {
    0%,100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-16px) rotate(3deg); }
}

.page {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #e0f2fe, #7dd3fc, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.page-sub {
    font-size: 14px;
    color: #334155;
    font-weight: 500;
}

#grid-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 860px;
    align-items: start;
}

.rank-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #94a3b8;
    z-index: 5;
}

.rank-badge.rank-1 {
    background: rgba(250, 204, 21, 0.15);
    border-color: rgba(250, 204, 21, 0.4);
    color: #fbbf24;
}
.rank-badge.rank-2 {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.3);
    color: #94a3b8;
}
.rank-badge.rank-3 {
    background: rgba(180, 120, 60, 0.12);
    border-color: rgba(180, 120, 60, 0.3);
    color: #cd7f32;
}

#grid-rest {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: 1100px;
    margin-top: 0;
}

@media (max-width: 900px) {
    #grid-top { grid-template-columns: 1fr; max-width: 380px; }
    #grid-top .server-card:nth-child(2),
    #grid-top .server-card:nth-child(3) { transform: none; order: unset; }
    #grid-top .server-card:nth-child(1) { order: unset; }
    #grid-rest { grid-template-columns: repeat(2, 1fr); max-width: 600px; }
}

@media (max-width: 500px) {
    #grid-rest { grid-template-columns: 1fr; max-width: 380px; }
}

.server-card {
    position: relative;
    background: rgba(4, 18, 38, 0.78);
    border: 1px solid rgba(0, 180, 255, 0.15);
    border-radius: 22px;
    padding: 22px 20px 18px;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
    backdrop-filter: blur(24px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
    overflow: visible;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 50%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,200,255,0.5), transparent);
}

.server-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 40px rgba(14,165,233,0.1);
}

.card-soon {
    cursor: default;
    opacity: 0.45;
}
.card-soon:hover { transform: none; border-color: rgba(0,180,255,0.15); box-shadow: 0 4px 30px rgba(0,0,0,0.5); }

.card-arrow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 14px;
    color: #1e3a5f;
    transition: color 0.25s, transform 0.25s;
}
.server-card:hover .card-arrow {
    color: #38bdf8;
    transform: translateX(5px);
    filter: drop-shadow(0 0 6px rgba(56,189,248,0.5));
}

.card-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.srv-icon {
    width: 52px; height: 52px;
    background: linear-gradient(145deg, #071e3d, #0a2a50);
    border: 1px solid rgba(0,180,255,0.18);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.srv-icon svg { width: 26px; height: 26px; color: #0ea5e9; }
.srv-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }

.soon-icon svg { color: #1e3a5f; }

.srv-info { flex: 1; min-width: 0; }

.srv-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: #e0f2fe;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.srv-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #1e3a5f;
    flex-shrink: 0;
    transition: all 0.4s;
}
.dot.online { background: #34d399; box-shadow: 0 0 7px #34d399; animation: dotPulse 2s ease-in-out infinite; }
.dot.offline { background: #f87171; }
.dot-soon { background: #1e3a5f; }

@keyframes dotPulse {
    0%,100% { box-shadow: 0 0 5px #34d399; }
    50% { box-shadow: 0 0 12px #34d399, 0 0 20px rgba(52,211,153,0.4); }
}

.card-bottom-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 14px;
}

.srv-players { display: flex; align-items: baseline; gap: 4px; }

.srv-online {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1;
    background: linear-gradient(135deg, #fff, #bae6fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.srv-max { font-size: 15px; color: #1e3a5f; font-weight: 600; }

.srv-actions { display: flex; gap: 8px; }

.copy-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.copy-toast {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(4, 18, 38, 0.95);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #34d399;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.act-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}

.act-btn:hover { background: rgba(14,165,233,0.15); border-color: rgba(56,189,248,0.3); color: #38bdf8; }
.act-btn.copied { color: #34d399; border-color: rgba(52,211,153,0.3); }

.srv-bar-wrap {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.srv-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #0369a1, #38bdf8);
    transition: width 0.8s ease;
    width: 0%;
}

.add-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    max-width: 1100px;
    margin-top: 20px;
    background: rgba(4, 18, 38, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.13);
    border-radius: 18px;
    padding: 20px 24px;
    backdrop-filter: blur(20px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.add-banner-text {
    display: flex;
    align-items: center;
    gap: 14px;
}

.add-banner-icon {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(56,189,248,0.4));
}

.add-banner-title {
    font-size: 15px;
    font-weight: 700;
    color: #e0f2fe;
    margin-bottom: 3px;
}

.add-banner-sub {
    font-size: 12px;
    color: #334155;
    font-weight: 500;
}

.add-banner-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0369a1, #0ea5e9);
    border: none;
    border-radius: 11px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 18px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.22s;
    box-shadow: 0 4px 16px rgba(14,165,233,0.35);
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
}

.add-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14,165,233,0.5);
}

@media (max-width: 600px) {
    .add-banner { flex-direction: column; align-items: flex-start; }
}

.footer {
    margin-top: 24px;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.footer a {
    color: #7dd3fc;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.footer a:hover { color: #38bdf8; }

.search-wrap {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    background: rgba(4, 18, 38, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.1);
    border-radius: 50px;
    padding: 14px 20px 14px 46px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #e0f2fe;
    outline: none;
    backdrop-filter: blur(20px);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder { color: #334155; }

.search-input:focus {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.06);
}

.search-input:focus ~ .search-icon,
.search-wrap:focus-within .search-icon { color: #38bdf8; }

.server-card.hidden { display: none; }


.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 1100px;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    margin-top: 10px;
}

.section-label-icon { font-size: 16px; }

.categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 860px;
}

.cat-btn {
    background: rgba(4, 18, 38, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.12);
    border-radius: 50px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    backdrop-filter: blur(12px);
}

.cat-btn:hover { color: #94a3b8; border-color: rgba(56,189,248,0.25); }

.cat-btn.active {
    background: linear-gradient(135deg, #0369a1, #0ea5e9);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(14,165,233,0.35);
}

.card-premium {
    border-color: rgba(99, 210, 255, 0.35) !important;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5), 0 0 20px rgba(56,189,248,0.08), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

.card-premium::before {
    background: linear-gradient(90deg, transparent, rgba(56,189,248,0.7), transparent) !important;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, rgba(56,189,248,0.15), rgba(14,165,233,0.1));
    border: 1px solid rgba(56,189,248,0.3);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 10px;
    width: fit-content;
}

.premium-badge svg { color: #38bdf8; }

.site-footer {
    width: 100%;
    max-width: 1100px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(56,189,248,0.08);
}

.footer-legal {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 16px;
}

.footer-legal a {
    color: #94a3b8;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.footer-legal a:hover { color: #7dd3fc; }

.footer-bottom {
    display: flex;
    justify-content: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-link {
    color: #94a3b8;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    text-decoration: none;
}

.footer-link:hover { color: #38bdf8; }

.footer-sep {
    color: #1e3a5f;
    font-size: 16px;
    user-select: none;
}

.footer-support-btn {
    background: rgba(14,165,233,0.1);
    border: 1px solid rgba(56,189,248,0.25);
    border-radius: 8px;
    color: #bae6fd;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.footer-support-btn:hover {
    background: rgba(14,165,233,0.18);
    border-color: rgba(56,189,248,0.4);
    color: #38bdf8;
}

.donate-wrap {
    position: relative;
}

.donate-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: rgba(4, 18, 38, 0.97);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 14px;
    padding: 6px;
    min-width: 200px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 100;
}

.donate-menu.open { display: flex; }

.donate-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #e0f2fe;
    transition: background 0.15s;
}

.donate-item:hover { background: rgba(56,189,248,0.08); }

.donate-flag { font-size: 22px; line-height: 1; }

.donate-name {
    font-size: 13px;
    font-weight: 700;
    color: #e0f2fe;
    margin-bottom: 2px;
}

.donate-sub {
    font-size: 11px;
    color: #475569;
    font-weight: 500;
}

.global-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
}

.stat-dot {
    color: #1e3a5f;
    font-size: 18px;
    line-height: 1;
}
