@import url('https://fonts.cdnfonts.com/css/minecraft-4');

/* Fallback dla polskich znaków diakrytycznych — font Minecraft nie zawiera ą/ę/ś/ó etc.
   Przeglądarka użyje systemowego fontu dla znaków spoza ASCII */
@font-face {
    font-family: 'Minecraft';
    src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
    unicode-range: U+00C0-U+024F;
}

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

:root {
    --primary: #16a34a;
    --primary-dark: #0f7a38;
    --bg: #2b2b2b;
    --bg-dark: #1e1e1e;
    --text: #e5e5e5;
    --text-dim: #999;
    --border: #3a3a3a;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg) url('https://i.imgur.com/HWhWzI1.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 30, 30, 0.9);
    z-index: -1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* NAVBAR */
header {
    background: rgba(30, 30, 30, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    padding: 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
    align-items: center;
    margin: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    font-family: 'Minecraft', sans-serif;
    color: var(--text);
    text-decoration: none;
    padding: 16px 20px;
    display: block;
    font-size: 14px;
    transition: background 0.2s;
    letter-spacing: 1px;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-menu a.active {
    background: rgba(255, 255, 255, 0.08);
}

.nav-menu a.help-link {
    color: var(--primary);
    font-family: 'Minecraft', sans-serif;
}

.nav-menu a.promo-link {
    color: #d97706;
    font-family: 'Minecraft', sans-serif;
    font-weight: 700;
}

.nav-menu a.promo-link:hover {
    color: #fbbf24;
    background: rgba(234, 179, 8, 0.08);
}

.nav-auth {
    padding: 8px 0;
}

.btn-discord {
    background: #5865F2 !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 8px 16px 8px 12px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    transition: background 0.2s !important;
}

.btn-discord::before {
    content: '';
    width: 18px;
    height: 18px;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 127.14 96.36'%3E%3Cpath fill='%23fff' d='M107.7 8.07A105.15 105.15 0 0 0 81.47 0a72.06 72.06 0 0 0-3.36 6.83 97.68 97.68 0 0 0-29.11 0A72.37 72.37 0 0 0 45.64 0a105.89 105.89 0 0 0-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0 0 32.17 16.15 77.7 77.7 0 0 0 6.89-11.11 68.42 68.42 0 0 1-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.57 75.57 0 0 0 64.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 0 1-10.87 5.19 77 77 0 0 0 6.89 11.1 105.25 105.25 0 0 0 32.19-16.14c2.64-27.38-4.51-51.11-18.9-72.15zM42.45 65.69C36.18 65.69 31 60 31 53s5-12.74 11.43-12.74S54 46 53.89 53s-5.05 12.69-11.44 12.69zm42.24 0C78.41 65.69 73.25 60 73.25 53s5-12.74 11.44-12.74S96.23 46 96.12 53s-5.04 12.69-11.43 12.69z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.btn-discord:hover {
    background: #4752C4 !important;
}

/* USER DROPDOWN */
.user-dropdown {
    position: relative;
    padding: 0 8px;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.user-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

#user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    object-fit: cover;
}

#user-name {
    color: var(--text);
    font-family: 'Minecraft', sans-serif;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.dropdown-arrow {
    color: var(--text-dim);
    font-size: 10px;
    transition: transform 0.2s;
}

.user-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 6px;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 200;
    overflow: hidden;
}

.user-dropdown.open .user-dropdown-menu {
    display: block;
}

.user-dropdown-menu a {
    display: block;
    padding: 11px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.user-dropdown-menu a:last-child {
    border-bottom: none;
}

.user-dropdown-menu a:hover {
    background: rgba(255,255,255,0.07);
}

.user-dropdown-menu a#logout-btn {
    color: #f87171;
}

.user-dropdown-menu a#logout-btn:hover {
    background: rgba(220, 38, 38, 0.15);
}

/* HERO SECTION */
.hero {
    padding: 32px 0;
}

.hero .container {
    background: 
        linear-gradient(135deg, rgba(46, 203, 178, 0.88) 0%, rgba(27, 172, 148, 0.88) 50%, rgba(18, 138, 116, 0.88) 100%),
        url('https://i.imgur.com/C6GMWln.png') center/cover;
    border-radius: 8px;
    padding: 56px 32px 48px;
    text-align: center;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-top: 3px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.hero .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.hero-logo {
    display: block;
    height: 240px;
    width: auto;
    margin: 0 auto 12px;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

.hero h1 {
    font-family: 'Minecraft', sans-serif;
    font-size: 48px;
    font-weight: 400;
    color: white;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.4);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.hero p {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.18);
    display: inline-block;
    padding: 5px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* AD BANNER */
.ad-banner {
    padding: 24px 0;
}

.ad-banner .container {
    max-width: 1280px;
}

.banner-placeholder {
    background: transparent;
    border: none;
    padding: 8px;
    text-align: center;
    overflow: hidden;
}

.banner-placeholder img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Ad placeholder */
.ad-placeholder {
    background: rgba(20, 20, 20, 0.85) !important;
    border: 1px dashed rgba(22, 163, 74, 0.4) !important;
    border-radius: 8px;
    padding: 0 !important;
    overflow: hidden;
}

.ad-placeholder-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.ad-label {
    font-family: 'Minecraft', Arial, sans-serif;
    font-size: 1rem;
    color: var(--text);
    letter-spacing: 0.5px;
}

.ad-sub {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.ad-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.4);
    border-radius: 50%;
    color: var(--primary);
    cursor: pointer;
    transition: background 0.2s, transform 0.3s;
    flex-shrink: 0;
    margin-left: 4px;
}

.ad-preview-btn:hover {
    background: rgba(22, 163, 74, 0.28);
}

.ad-preview-btn.open {
    transform: rotate(90deg);
}

.ad-example {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    border-top: 0px solid rgba(22, 163, 74, 0.2);
}

.ad-example.open {
    max-height: 320px;
    border-top-width: 1px;
}

.ad-example-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 8px 0 4px;
    text-align: center;
}

.ad-example img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    padding-bottom: 12px;
}

/* SEARCH SECTION */
.search-section {
    padding: 32px 0 24px;
}

.search-bar {
    display: flex;
    gap: 0;
    max-width: 100%;
}

.search-bar input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: var(--text);
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-bar input::placeholder {
    color: var(--text-dim);
}

.search-btn {
    padding: 14px 32px;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 0 4px 4px 0;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* FILTERS */
.filters-section {
    display: flex;
    gap: 12px;
    padding: 0 0 24px;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 4px;
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn svg {
    flex-shrink: 0;
    transition: inherit;
}

.filter-btn:hover {
    background: rgba(22, 163, 74, 0.1);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
}

/* ZAAWANSOWANE FILTRY */
.advanced-filters-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    animation: fadeIn 0.15s ease;
}

.advanced-filters-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.advanced-filters-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}

.version-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.version-chip {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s;
    white-space: nowrap;
}

.version-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(22,163,74,.07);
}

.version-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

[data-theme="light"] .advanced-filters-panel {
    background: #fff;
}

[data-theme="light"] .version-chip {
    color: #444;
    border-color: #d1d5db;
}

[data-theme="light"] .version-chip:hover,
[data-theme="light"] .version-chip.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(22,163,74,.08);
}

[data-theme="light"] .version-chip.active {
    background: var(--primary);
    color: #fff;
}

/* PROMOTED SECTION */
.promoted-section {
    margin-bottom: 32px;
}

.promoted-section h2 {
    font-family: 'Minecraft', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    letter-spacing: 1px;
}

/* SERVER LIST */
.servers-list {
    margin-bottom: 48px;
}

.server-card {
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    gap: 14px;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
}

.server-card:hover {
    background: rgba(55, 55, 55, 0.95);
    border-color: var(--primary);
}

.server-card.featured {
    background: rgba(234, 179, 8, 0.06);
    border-left: 3px solid #d97706;
}

/* ICON */
.server-icon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.icon-status-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
}
.icon-status-badge.online {
    background: rgba(34, 197, 94, 0.15);
    color: var(--primary);
}
.icon-status-badge.offline {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.server-icon-box {
    width: 68px;
    height: 68px;
    border-radius: 8px;
    background: rgba(20, 20, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.server-icon-img {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 7px;
    image-rendering: pixelated;
}

.server-icon-emoji {
    font-size: 28px;
    line-height: 1;
    color: #888;
}

/* MAIN CONTENT */
.server-main {
    flex: 1;
    min-width: 0;
}

.server-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.server-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

/* SC = server card (namespace) */
.sc-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.sc-verified {
    background: rgba(88,101,242,0.2);
    color: #818cf8;
    border: 1px solid rgba(88,101,242,0.3);
}

.sc-premium {
    background: rgba(234,179,8,0.18);
    color: #fbbf24;
    border: 1px solid rgba(234,179,8,0.4);
}

/* TYPE FILTER PANEL */
.type-filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    animation: fadeIn 0.15s ease;
}

.type-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.type-chip {
    padding: 5px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s;
    white-space: nowrap;
}

.type-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(22,163,74,.07);
}

.type-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

[data-theme="light"] .type-filter-panel {
    background: #fff;
}

[data-theme="light"] .type-chip {
    color: #444;
    border-color: #d1d5db;
}

[data-theme="light"] .type-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(22,163,74,.08);
}

[data-theme="light"] .type-chip.active {
    background: var(--primary);
    color: #fff;
}

/* DODAJ SERWER – typ toggler */
.server-type-toggle {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    width: fit-content;
}

.type-toggle-btn {
    padding: 8px 20px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.type-toggle-btn:first-child {
    border-right: 1px solid var(--border);
}

.type-toggle-btn.active {
    background: var(--primary);
    color: #fff;
}

.form-hint {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 5px;
}

.sc-status {
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: auto;
}

.sc-status.online   { color: var(--primary); }
.sc-status.offline  { color: #ef4444; }

.server-meta {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.server-description {
    font-size: 13px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    max-width: 500px;
}

/* STATS PANEL — vertical pills stacked on the right */
.server-stats-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    align-items: stretch;
    min-width: 120px;
    width: auto;
}

.stat-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(20, 20, 30, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    padding: 5px 10px;
    transition: border-color 0.15s;
}

.stat-pill:nth-child(2) {
    border-left-color: #f59e0b;
}

.stat-pill-num {
    color: #f1f5f9;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.stat-pill-max {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 400;
}

.stat-pill-lbl {
    color: #9ca3af;
    font-size: 9px;
    margin-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.mode-count {
    display: inline-block;
    background: rgba(34,197,94,0.15);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

/* STATUS BADGE (strona serwera) */
.server-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.server-status.online {
    background: rgba(34, 197, 94, 0.2);
    color: var(--primary);
}

.server-status.offline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.server-status::before {
    content: '●';
    font-size: 8px;
}

/* MODALS */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
}

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

.modal-header h2 {
    color: var(--text);
    font-size: 24px;
}

.close {
    color: var(--text-dim);
    font-size: 32px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.close:hover {
    color: var(--text);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

button[type="submit"],
.btn {
    padding: 12px 24px;
    background: var(--primary);
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

button[type="submit"]:hover,
.btn:hover {
    background: var(--primary-dark);
}

/* FOOTER */
footer {
    background: rgba(30, 30, 30, 0.95);
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 64px;
    color: var(--text-dim);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 24px;
}

.footer-section h3,
.footer-section h4 {
    color: var(--text);
    margin-bottom: 12px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--text-dim);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--text);
}

/* Footer stats */
.footer-stats {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-stats li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    white-space: nowrap;
}

.footer-stat-label {
    color: var(--text-dim);
}

.footer-stat-val {
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* ALERTS */
.alert {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 16px 20px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 2000;
    min-width: 250px;
}

.alert.success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.alert.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* LOADING & EMPTY */
.loading {
    text-align: center;
    padding: 48px;
    color: var(--text-dim);
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-dim);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero .container {
        padding: 32px 20px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-logo {
        width: 160px;
        height: 160px;
        margin-bottom: 4px;
    }

    .navbar .container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 20px;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar input {
        border-radius: 4px;
        border-right: 1px solid var(--border);
    }

    .search-btn {
        border-radius: 4px;
    }

    .server-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .server-stats-panel {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
    }

    .server-icon-wrap {
        display: none;
    }

    .sc-status {
        margin-left: 0;
    }
}

/* LOAD MORE BUTTON */
.load-more-btn {
    display: inline-block;
    padding: 12px 36px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-family: 'Minecraft', sans-serif;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.load-more-btn:hover {
    background: var(--primary-hover, #3a7bd5);
    transform: translateY(-1px);
}

.load-more-btn:disabled {
    background: var(--border);
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   PAGINACJA
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    margin: 28px 0 12px;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: var(--card-bg, #1e1e1e);
    color: var(--text-primary, #e0e0e0);
    border: 1px solid var(--border, #333);
    border-radius: 4px;
    font-family: 'Minecraft', Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 36px;
    text-align: center;
}

.page-btn:hover:not(:disabled):not(.active) {
    background: var(--surface, #2a2a2a);
    border-color: var(--primary, #4a90d9);
}

.page-btn.active {
    background: var(--primary, #4a90d9);
    border-color: var(--primary, #4a90d9);
    color: #fff;
    cursor: default;
}

.page-btn.disabled,
.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-ellipsis {
    min-width: 28px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #888);
    font-size: 16px;
    user-select: none;
}

/* ============================================================
   SEKCJA PRZEGLĄDANIA (wersje + tryby)
   ============================================================ */
.browse-section {
    margin: 36px 0 20px;
}

.browse-title {
    font-size: 1rem;
    font-family: Arial, sans-serif;
    font-weight: 700;
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 14px;
}

/* WERSJE */
.versions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 700px) {
    .versions-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
    .versions-grid { grid-template-columns: 1fr; }
}

.version-group {
    background: var(--card-bg, #1e1e1e);
    border: 1px solid var(--border, #333);
    border-radius: 6px;
    padding: 10px 14px 12px;
}

.version-major {
    font-weight: 700;
    font-size: 0.97rem;
    margin-bottom: 6px;
    text-align: center;
}

.version-major a,
.version-minor a {
    color: var(--text-primary, #e0e0e0);
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 0.88rem;
    transition: color 0.15s;
}

.version-major a:hover,
.version-minor a:hover {
    color: var(--primary, #4a90d9);
    text-decoration: underline;
}

.version-minor {
    text-align: center;
    padding: 3px 0;
    font-size: 0.83rem;
    color: var(--text-muted, #aaa);
}

/* TRYBY */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (max-width: 900px) {
    .modes-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
    .modes-grid { grid-template-columns: repeat(2, 1fr); }
}

.mode-btn {
    background: var(--card-bg, #1e1e1e);
    color: var(--text-primary, #e0e0e0);
    border: 1px solid var(--border, #333);
    border-radius: 4px;
    padding: 10px 12px;
    font-family: Arial, sans-serif;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mode-btn:hover {
    background: var(--surface, #2a2a2a);
    border-color: var(--primary, #4a90d9);
    color: var(--primary, #4a90d9);
}

.mode-btn.featured-mode {
    border-color: #c8a000;
    color: #e8c000;
}

.mode-btn.featured-mode:hover {
    background: rgba(200, 160, 0, 0.12);
    border-color: #e8c000;
}

/* DISCLAIMER MOJANG */
.mojang-disclaimer {
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    color: var(--text-muted, #888);
    text-align: center;
    margin: 24px 0 32px;
    line-height: 1.5;
    padding: 0 12px;
}

/* ===========================
   LIGHT THEME
   =========================== */
[data-theme="light"] {
    --bg: #ececec;
    --bg-card: #ffffff;
    --bg-dark: #f5f5f5;
    --text: #1a1a1a;
    --text-dim: #555;
    --border: #c8c8c8;
    --primary: #5865F2;
}
[data-theme="light"] body {
    background-color: var(--bg);
    color: var(--text);
}
[data-theme="light"] body::before {
    background: rgba(236, 236, 236, 0.92);
}
[data-theme="light"] header {
    background: rgba(245, 245, 245, 0.97);
    border-bottom-color: var(--border);
}
[data-theme="light"] .navbar a,
[data-theme="light"] .nav-menu a {
    color: var(--text);
}
[data-theme="light"] .server-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--border);
    color: var(--text);
}
[data-theme="light"] .server-card:hover {
    border-color: var(--primary);
    background: #fff;
}
[data-theme="light"] .stat-pill {
    background: rgba(240, 242, 248, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .stat-pill-num {
    color: #111827;
}
[data-theme="light"] .stat-pill-lbl,
[data-theme="light"] .stat-pill-max {
    color: #6b7280;
}
[data-theme="light"] .filter-btn {
    background: rgba(220, 220, 220, 0.8);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="light"] .filter-btn.active,
[data-theme="light"] .filter-btn:hover {
    background: var(--primary);
    color: #fff;
}
[data-theme="light"] .search-bar input {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="light"] .search-bar input::placeholder {
    color: #999;
}
[data-theme="light"] .hero {
    background: transparent;
}
[data-theme="light"] footer {
    background: rgba(230, 230, 230, 0.97);
    border-top-color: var(--border);
    color: var(--text);
}
[data-theme="light"] .modal-content {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
}
[data-theme="light"] .user-dropdown-menu {
    background: #fff;
    border-color: var(--border);
}
[data-theme="light"] .user-dropdown-menu a {
    color: var(--text);
}
[data-theme="light"] .user-dropdown-menu a:hover {
    background: #f0f0f0;
}

/* ===========================
   THEME TOGGLE BUTTON
   =========================== */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border, #444);
    color: var(--text, #fff);
    padding: 4px 9px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.theme-toggle-btn:hover {
    border-color: var(--primary, #5865F2);
    background: rgba(88, 101, 242, 0.12);
}

/* ===========================
   FAVORITE BUTTON
   =========================== */
.fav-btn {
    width: 34px;
    height: 34px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: rgba(239, 68, 68, 0.55);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    border-radius: 8px;
    transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.fav-btn.active,
.fav-btn:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.1);
}
/* fav button on server detail page */
.btn-fav {
    background: none;
    border: 1px solid var(--border, #444);
    color: var(--text-dim, #888);
    font-size: 15px;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.btn-fav:hover,
.btn-fav.active {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* ===========================
   SERVER CARD FAV + COMPARE BTNS
   =========================== */
.server-card-btns {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
    margin-left: 8px;
}
.compare-label {
    font-size: 10px;
    color: var(--text-dim, #888);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.compare-label:hover {
    opacity: 1;
}
.compare-chk {
    accent-color: var(--primary, #5865F2);
    cursor: pointer;
    width: 14px;
    height: 14px;
}

/* ===========================
   COMPARE BAR (fixed bottom)
   =========================== */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 30, 0.97);
    border-top: 2px solid var(--primary, #5865F2);
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 300;
    gap: 16px;
    backdrop-filter: blur(6px);
}
[data-theme="light"] .compare-bar {
    background: rgba(230, 230, 240, 0.97);
    color: var(--text);
}
.compare-bar-btn {
    background: var(--primary, #5865F2);
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}
.compare-bar-btn:hover {
    background: #4752c4;
}
.compare-bar-clear {
    background: none;
    border: 1px solid var(--border, #555);
    color: var(--text-dim, #aaa);
    padding: 8px 16px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s, color 0.2s;
}
.compare-bar-clear:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ===========================
   VERIFY TOKEN BOX (moje-serwery)
   =========================== */
.verify-token-box {
    background: rgba(0, 0, 0, 0.18);
    border: 1px dashed var(--primary, #5865F2);
    border-radius: 6px;
    padding: 10px 16px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
[data-theme="light"] .verify-token-box {
    background: rgba(88, 101, 242, 0.06);
}
