/* ===== CSS Variables ===== */
:root {
    --primary: #00e5ff;
    --primary-dark: #00b8cc;
    --secondary: #7c3aed;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --bg-dark: #0a0e1a;
    --bg-elevated: #111827;
    --bg-card: #1f2937;
    --bg-hover: #374151;

    --border: #374151;
    --border-light: #4b5563;

    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --text-disabled: #6b7280;

    --header-height: 70px;
    --nav-height: 50px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary);
}

/* ===== Container ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 28px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* ===== Buttons ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

/* ===== Navigation ===== */
.nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
    position: sticky;
    top: var(--header-height);
    z-index: 99;
}

.nav-menu {
    display: flex;
    list-style: none;
    height: var(--nav-height);
    margin: 0;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
}

.nav-link {
    display: block;
    padding: 0 24px;
    height: var(--nav-height);
    line-height: var(--nav-height);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-item.active .nav-link {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-item:not(.disabled) .nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-item.disabled .nav-link {
    color: var(--text-disabled);
    cursor: not-allowed;
    opacity: 0.5;
}

/* ===== Server Info Banner (3 COLUMNS) ===== */
.server-banner {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}

.banner-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
}

/* Left: Status */
.banner-left {
    display: flex;
    justify-content: flex-start;
}

.server-status-large {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    font-size: 24px;
    color: var(--success);
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    color: var(--danger);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Center: Details */
.banner-center {
    display: flex;
    justify-content: center;
}

.server-details {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 16px;
    color: var(--text-secondary);
}

.detail-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.detail-icon {
    font-size: 20px;
}

.detail-divider {
    color: var(--text-muted);
    font-size: 20px;
}

/* Right: Connect Button */
.banner-right {
    display: flex;
    justify-content: flex-end;
}

.btn-connect {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* ===== Main Layout ===== */
.main {
    padding: 32px 0;
    min-height: calc(100vh - var(--header-height) - var(--nav-height) - 200px);
}

.layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

/* ===== Sidebars ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Connect Box */
.connect-box {
    display: flex;
    flex-direction: column;
}

.connect-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

/* Feature List */
.feature-list {
    list-style: none;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-item.disabled {
    color: var(--text-disabled);
    opacity: 0.6;
}

.feature-icon {
    color: var(--success);
    font-weight: 700;
}

.feature-item.disabled .feature-icon {
    color: var(--text-disabled);
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.social-link:not(.disabled):hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--text-primary);
}

.social-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Players Widget */
.players-widget {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-elevated);
    border-radius: 6px;
    font-size: 13px;
}

.player-rank {
    color: var(--text-muted);
    font-weight: 700;
    min-width: 30px;
}

.player-name {
    flex: 1;
    color: var(--text-primary);
}

.player-score {
    color: var(--primary);
    font-weight: 700;
}

/* Stats Widget */
.stats-widget {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.stats-item:last-child {
    border-bottom: none;
}

.stats-label {
    color: var(--text-muted);
}

.stats-value {
    color: var(--text-primary);
    font-weight: 600;
}

.stats-value.disabled {
    color: var(--text-disabled);
    font-size: 11px;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-elevated);
    border-radius: 6px;
    font-size: 13px;
}

.activity-item.disabled {
    opacity: 0.5;
}

.activity-icon {
    font-size: 18px;
}

.activity-text {
    color: var(--text-secondary);
    font-size: 12px;
}

/* ===== Content Area ===== */
.content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
}

.content-section {
    margin-bottom: 48px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

/* News Cards */
.news-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.news-card.disabled {
    opacity: 0.6;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.news-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: var(--bg-dark);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
}

.news-card.disabled .news-badge {
    background: var(--text-disabled);
}

.news-date {
    font-size: 13px;
    color: var(--text-muted);
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.news-content {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

.news-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.news-content li {
    margin: 8px 0;
}

.news-content strong {
    color: var(--text-primary);
}

.news-content p {
    margin: 12px 0;
}

/* Steps Container */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.step-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--bg-dark);
    font-size: 18px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 48px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin: 8px 0;
    font-size: 14px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:not(.disabled):hover {
    color: var(--primary);
}

.footer-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-bottom p {
    margin: 4px 0;
}

.footer-credit {
    margin-top: 8px;
}

/* ===== Utility Classes ===== */
.disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .layout {
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 992px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .banner-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .banner-left,
    .banner-center,
    .banner-right {
        justify-content: center;
    }

    .server-details {
        font-size: 14px;
    }

    .status-text {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        gap: 8px;
    }

    .header-actions .btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .nav-menu {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-link {
        padding: 0 16px;
        white-space: nowrap;
    }

    .server-banner {
        padding: 20px 0;
    }

    .banner-content {
        gap: 16px;
    }

    .status-text {
        font-size: 18px;
    }

    .server-details {
        font-size: 13px;
        gap: 10px;
        justify-content: center;
    }

    .detail-icon {
        font-size: 16px;
    }

    .btn-connect {
        font-size: 14px;
        padding: 10px 20px;
    }

    .content {
        padding: 20px;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }
}
