@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&display=swap');

:root {
    --bg-dark: #0a1f14;
    --bg-darker: #071510;
    --accent: #1f8a45;
    --accent-hover: #23a350;
    --text-white: #f2f5f3;
    --text-mint: #7fae8e;
    --logo-placeholder: #dedbd3;
}

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

html {
    background: var(--bg-darker);
    min-height: 100%;
}

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg-darker);
    color: var(--text-white);
    min-height: 100vh;
}

/* ---------- Header / Nav ---------- */

.site-header {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 24px 48px;
}


.logo-box {
    justify-self: start;
}

.main-nav {
    justify-self: center;
    display: flex;
    gap: 32px;
    list-style: none;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.main-nav a:hover {
    color: var(--text-mint);
}

.nav-icon {
    width: clamp(18px, 1vw, 24px);
    height: clamp(18px, 1vw, 24px);
    flex-shrink: 0;
}

.main-nav img.nav-icon {
    filter: brightness(0) invert(1);
}

.btn-login,
.dropdown {
    justify-self: end;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--text-white);
    font-weight: 700;
    font-size: clamp(13px, 0.85vw, 15px);
    padding: 12px 22px;
    border-radius: 999px;
    transition: background 0.15s ease;
}

.btn-login:hover, .btn-login:focus {
    background: var(--accent-hover);
}

.btn-login a {
    color: var(--text-white);
    text-decoration: none;
}

.pfp {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
}

.logout-form {
    display: flex;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.btn-login img.nav-icon {
    filter: brightness(0) invert(1);
}


/* ---------- Account dropdown ---------- */

.dropdown {
    position: relative;
}

.dropbtn {
    cursor: pointer;
    border: none;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--bg-dark);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 20;
}

.dropdown-content.open {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-content a,
.dropdown-content .dropdown-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    background: none;
    border: none;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.dropdown-content .logout-form {
    width: 100%;
}

.dropdown-content .dropdown-logout-btn {
    color: #e05a5a;
}

.dropdown-content .dropdown-logout-btn:hover {
    background: rgba(224, 90, 90, 0.12);
}

.dropdown-content .nav-icon {
    filter: none; /* override the global white-icon filter for these two */
}

.dropdown-content .dropdown-logout-btn .nav-icon {
    color: #e05a5a;
}

/* ---------- Profile page ---------- */

.profile-page {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 48px auto;
    padding: 0 24px;
    align-items: start;
}

.profile-card {
    background: var(--bg-dark);
    border: 1px solid rgba(38, 173, 85, 0.8);
    border-radius: 20px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-avatar-wrap {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
    border: 2px solid var(--accent);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 20px;
    font-weight: 800;
}

.profile-status {
    color: var(--accent-hover);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}

.profile-info-list {
    width: 100%;
    margin-bottom: 28px;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
}

.profile-info-row dt {
    color: var(--text-mint);
    font-weight: 700;
}

.profile-info-row dd {
    font-weight: 700;
}

.profile-link {
    color: var(--accent-hover);
    text-decoration: underline;
}

.profile-logout-form {
    width: 100%;
    margin-top: auto;
}

.profile-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #3a1f14;
    border: 1px solid #6b3a26;
    color: #e8a97e;
    font-weight: 700;
    font-size: 14px;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
}

.profile-logout-btn:hover {
    background: #4a2818;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-mint);
    font-weight: 700;
    font-size: 14px;
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.profile-tab.active {
    color: var(--text-white);
    border-bottom-color: var(--accent);
}

.profile-tab-panel {
    display: none;
    position: relative;
    min-height: 340px;
    background: var(--bg-dark);
    border: 1px solid rgba(38, 173, 85, 0.8);
    border-radius: 0 0 20px 20px;
    padding: 32px;
    overflow: hidden;
}

.profile-tab-panel.active {
    display: block;
}

body.profile-view {
    background:
        linear-gradient(180deg, rgba(7, 21, 16, 0.97) 0%, rgba(7, 21, 16, 0.75) 30%, rgba(7, 21, 16, 0.75) 70%, rgba(7, 21, 16, 0.97) 100%),
        url('../img/profile-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.profile-page {
    position: relative;
}

.profile-server-title {
    font-size: 16px;
    font-weight: 700;
}

.profile-server-title span {
    color: var(--accent-hover);
}

.profile-server-sub {
    color: var(--text-mint);
    font-size: 13px;
    margin-bottom: 24px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.profile-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(10, 31, 20, 0.7);
    border: 1px solid rgba(31, 138, 69, 0.3);
    border-radius: 14px;
    padding: 16px;
}

.profile-stat-card .nav-icon {
    width: 22px;
    height: 22px;
    color: var(--accent-hover);
    flex-shrink: 0;
}

.profile-stat-label {
    display: block;
    color: var(--text-mint);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.profile-stat-value {
    display: block;
    font-size: 16px;
    font-weight: 800;
}

.profile-stats-note {
    color: var(--text-mint);
    font-size: 12px;
    font-style: italic;
}

.profile-empty {
    color: var(--text-mint);
    font-size: 14px;
}

/* ---------- Ban list ---------- */

.ban-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ban-item {
    background: rgba(10, 31, 20, 0.7);
    border: 1px solid rgba(31, 138, 69, 0.3);
    border-radius: 14px;
    padding: 16px 18px;
}

.ban-item-active {
    border-color: rgba(224, 90, 90, 0.4);
}

.ban-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ban-badge {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 10px;
    border-radius: 999px;
}

.ban-badge-active {
    color: #e05a5a;
    background: rgba(224, 90, 90, 0.12);
}

.ban-badge-expired {
    color: var(--text-mint);
    background: rgba(127, 174, 142, 0.1);
}

.ban-date {
    color: var(--text-mint);
    font-size: 12px;
    font-weight: 600;
}

.ban-reason {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ban-item-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-mint);
    font-size: 13px;
    font-weight: 600;
}

.ban-item-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ban-item-meta .nav-icon {
    width: 16px;
    height: 16px;
    color: var(--text-mint);
}

@media (max-width: 900px) {
    .profile-page {
        grid-template-columns: 1fr;
    }
}


/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center 30%;
    overflow: hidden;
}

/* header sits over the hero image, so pull it inside visually */
.hero-header-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.hero::before {
    /* dark green tint + left-to-right fade so text stays readable */
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 21, 16, 0.97) 0%, rgba(7, 21, 16, 0.85) 38%, rgba(10, 31, 20, 0.35) 65%, rgba(10, 31, 20, 0.15) 100%),
        linear-gradient(180deg, rgba(7, 21, 16, 0.55) 0%, rgba(7, 21, 16, 0.15) 30%, rgba(7, 21, 16, 0.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: min(45vw, 720px);
    padding: 140px 48px 120px;
}

.hero-title {
    font-size: clamp(26px, 2.2vw, 40px);
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.hero-subtitle {
    font-size: clamp(20px, 1.8vw, 30px);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-desc {
    color: var(--text-mint);
    font-weight: 600;
    font-size: clamp(14px, 0.9vw, 16px);
    line-height: 1.6;
    max-width: 460px;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-connect {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--text-white);
    text-decoration: none;
    font-weight: 800;
    font-size: clamp(14px, 0.9vw, 16px);
    letter-spacing: 0.3px;
    padding: 16px 26px;
    border-radius: 999px;
    transition: background 0.15s ease;
}

.btn-connect:hover {
    background: var(--accent-hover);
}

.btn-connect .nav-icon {
    width: clamp(16px, 1vw, 20px);
    height: clamp(16px, 1vw, 20px);
}

.connect-console {
    color: var(--text-mint);
    font-size: clamp(13px, 0.85vw, 15px);
    font-weight: 600;
}

.connect-console code {
    color: var(--text-white);
    font-family: 'Manrope', sans-serif;
}

/* ---------- Wave divider ---------- */

.wave-divider {
    display: block;
    width: 100%;
    line-height: 0;
    margin-top: -2px; /* removes hairline gap between hero and wave fill */
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 90px;
}

/* ---------- Below the fold ---------- */

.below-fold {
    background: var(--bg-darker);
    min-height: 40vh;
    padding: 60px 48px;
}

/* ---------- Server status widget ---------- */

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1100px;
}

.status-card {
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
}

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

.status-card-top h3 {
    font-size: clamp(16px, 1.1vw, 19px);
    font-weight: 800;
}

.status-dot {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.status-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    color: var(--accent-hover);
}

.status-dot.online::before {
    background: var(--accent-hover);
}

.status-dot.offline {
    color: #b05555;
}

.status-dot.offline::before {
    background: #b05555;
}

.status-meta {
    color: var(--text-mint);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 18px;
}

.status-connect {
    display: inline-block;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    background: var(--accent);
    padding: 10px 18px;
    border-radius: 999px;
    transition: background 0.15s ease;
}

.status-connect:hover {
    background: var(--accent-hover);
}

.status-empty {
    color: var(--text-mint);
    font-size: 14px;
}

.hidden-form {
    display: none;
}

/* ---------- Top-up modal ---------- */

.topup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(4, 12, 8, 0.72);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.topup-overlay.open {
    display: flex;
    animation: topup-fade-in 0.15s ease-out;
}

body.topup-lock-scroll {
    overflow: hidden;
}

.topup-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--bg-dark);
    border: 1px solid rgba(38, 173, 85, 0.8);
    border-radius: 20px;
    padding: 36px 32px 32px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: topup-scale-in 0.18s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .topup-overlay.open,
    .topup-modal {
        animation: none;
    }
}

.topup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    color: var(--text-mint);
}

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

.topup-eyebrow {
    color: var(--text-mint);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.topup-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
}

.topup-sub {
    color: var(--text-mint);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 24px;
}

.topup-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.topup-chip {
    background: rgba(10, 31, 20, 0.7);
    border: 1px solid rgba(31, 138, 69, 0.3);
    border-radius: 14px;
    color: var(--text-white);
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 14px 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.topup-chip:hover {
    border-color: var(--accent);
}

.topup-chip.active {
    background: rgba(31, 138, 69, 0.18);
    border-color: var(--accent);
    color: var(--accent-hover);
}

.topup-custom-label {
    display: block;
    color: var(--text-mint);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.topup-custom-row {
    position: relative;
    margin-bottom: 12px;
}

.topup-custom-input {
    width: 100%;
    background: rgba(10, 31, 20, 0.7);
    border: 1px solid rgba(31, 138, 69, 0.3);
    border-radius: 14px;
    color: var(--text-white);
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 40px 14px 16px;
    transition: border-color 0.15s ease;
}

.topup-custom-input:focus {
    outline: none;
    border-color: var(--accent);
}

.topup-currency-suffix {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--text-mint);
    font-weight: 700;
    pointer-events: none;
}

.topup-note {
    color: var(--text-mint);
    font-size: 12px;
    font-style: italic;
    margin-bottom: 24px;
}

.topup-submit {
    width: 100%;
    justify-content: center;
    border: none;
    cursor: pointer;
}

/* ---------- Donate page (full-page variant of the top-up card) ---------- */

.topup-page-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 140px);
    padding: 64px 24px;
}

.topup-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--bg-dark);
    border: 1px solid rgba(38, 173, 85, 0.8);
    border-radius: 20px;
    padding: 36px 32px 32px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}


/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .main-nav {
        display: none; /* swap for a mobile menu button when you build one */
    }

    .site-header {
        padding: 20px 24px;
    }

    .hero-content {
        padding: 120px 24px 100px;
    }

    .hero-subtitle {
        font-size: 18px;
    }
}


@keyframes topup-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes topup-scale-in {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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