/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0d0d1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f3a;
    --bg-input: #12121f;
    --border: #2a2a4a;
    --gold: #d4a574;
    --gold-light: #e8c59a;
    --gold-dark: #b8874e;
    --text: #e0dcd0;
    --text-muted: #8a8a9a;
    --text-dim: #5a5a6a;
    --success: #4ade80;
    --error: #f87171;
    --online: #4ade80;
    --offline: #6b7280;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--gold-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    margin-bottom: 0.5em;
}

/* === Layout === */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    padding: 2rem 1rem;
}

/* === Header === */
.site-header {
    background: var(--bg-card);
    border-bottom: 2px solid var(--gold-dark);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}
.logo:hover { color: var(--gold-light); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}

.nav-list a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text);
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
    font-size: 0.9rem;
}
.nav-list a:hover {
    background: rgba(212, 165, 116, 0.15);
    color: var(--gold);
}

/* === Hero === */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(180deg, rgba(212, 165, 116, 0.08) 0%, transparent 100%);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    letter-spacing: 4px;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 10px rgba(212, 165, 116, 0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-dark);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--bg-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--gold-dark);
    color: var(--gold);
}
.btn-secondary:hover {
    background: rgba(212, 165, 116, 0.1);
    color: var(--gold-light);
}

.btn-full { width: 100%; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }

.btn-filter {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.375rem 1rem;
    font-size: 0.85rem;
}
.btn-filter:hover, .btn-filter.active {
    border-color: var(--gold-dark);
    color: var(--gold);
    background: rgba(212, 165, 116, 0.1);
}

.btn-download {
    font-size: 1rem;
    padding: 0.75rem 2rem;
}

/* === Cards === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.card-header h2 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* === Info Cards Grid === */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* === Server Status === */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.status-indicator.online .status-dot {
    background: var(--online);
    box-shadow: 0 0 8px var(--online);
    animation: pulse 2s infinite;
}
.status-indicator.offline .status-dot {
    background: var(--offline);
}
.status-indicator.online { color: var(--online); }
.status-indicator.offline { color: var(--offline); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.players-count {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.server-ip, .server-port {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* === Rates === */
.rates-list, .features-list {
    list-style: none;
}

.rates-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(42, 42, 74, 0.5);
}
.rates-list li:last-child { border-bottom: none; }

.rate-label { color: var(--text-muted); }
.rate-value {
    color: var(--gold);
    font-weight: 600;
    font-family: 'Cinzel', serif;
}

.features-list li {
    padding: 0.375rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-muted);
}
.features-list li::before {
    content: '\2726';
    position: absolute;
    left: 0;
    color: var(--gold-dark);
}

/* === Download === */
.download-section {
    text-align: center;
    padding: 2rem 0;
}
.download-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.download-section > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.download-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow);
}
.download-info { text-align: left; }
.download-info h3 {
    color: var(--gold);
    margin-bottom: 0.25rem;
}
.download-info code {
    background: var(--bg-input);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* === Forms === */
.form-section {
    max-width: 550px;
    margin: 0 auto;
}

.form-section h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

fieldset {
    border: none;
    margin-bottom: 1.5rem;
}

legend {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    width: 100%;
    display: block;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.15);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.radio-label input[type="radio"] {
    accent-color: var(--gold);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* === Alerts === */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert ul {
    list-style: none;
    padding: 0;
}

.alert a { font-weight: 600; }

.alert-success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--error);
}

/* === Tables === */
.info-table {
    width: 100%;
}
.info-table th, .info-table td {
    padding: 0.5rem 0;
    text-align: left;
}
.info-table th {
    color: var(--text-muted);
    font-weight: 400;
    width: 35%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead th {
    text-align: left;
    padding: 0.75rem;
    background: var(--bg-input);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}
.data-table tbody td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid rgba(42, 42, 74, 0.4);
    font-size: 0.9rem;
}
.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.rank {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: 600;
}

/* === Status Badges === */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}
.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.status-badge.online {
    background: rgba(74, 222, 128, 0.1);
    color: var(--online);
}
.status-badge.online::before { background: var(--online); }
.status-badge.offline {
    background: rgba(107, 114, 128, 0.1);
    color: var(--offline);
}
.status-badge.offline::before { background: var(--offline); }

/* === Highscores === */
.highscores-section h1 {
    margin-bottom: 1rem;
}

.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.highscores-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1.5rem;
}
.pagination .btn.active {
    background: var(--gold-dark);
    color: var(--bg-dark);
    border-color: var(--gold-dark);
}

/* === Account === */
.account-section h1 {
    margin-bottom: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* === Footer === */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: auto;
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 0.95rem; }

    .nav-toggle { display: block; }
    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 2px solid var(--gold-dark);
        padding: 0.5rem;
    }
    .nav-list.open { display: flex; }

    .download-box {
        flex-direction: column;
        gap: 1rem;
    }
    .download-info { text-align: center; }

    .data-table { font-size: 0.85rem; }
    .data-table thead th,
    .data-table tbody td { padding: 0.5rem; }

    .info-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.75rem; letter-spacing: 2px; }
    .form { padding: 1rem; }
    .form-actions { flex-direction: column; }
}
