/* Shared polish for CoreBlocks secondary pages. */
.rules-page,
.privileges-page,
.profile-page,
.server-status-page {
    width: min(100%, 1120px);
}

.rules-header,
.privileges-header,
.profile-header,
.server-status-header {
    position: relative;
    overflow: hidden;
    border: 0 !important;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 15% 20%, rgba(53, 88, 242, 0.2), transparent 38%),
        radial-gradient(circle at 85% 75%, rgba(124, 58, 237, 0.18), transparent 42%);
}

.rules-header::after,
.privileges-header::after,
.profile-header::after,
.server-status-header::after {
    content: '';
    position: absolute;
    right: -45px;
    bottom: -70px;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(200, 169, 255, 0.14);
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(115, 80, 234, 0.15);
    pointer-events: none;
}

.rules-header h1,
.privileges-header h1,
.profile-header h1,
.server-status-header h1 {
    position: relative;
    z-index: 1;
    font-family: 'Russo One', 'Inter', sans-serif;
    font-size: clamp(2rem, 6vw, 2.8rem) !important;
    font-weight: 400 !important;
    background: linear-gradient(105deg, #fff, #c8a9ff 46%, #5d8dff 78%, #ff9a3c) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 8px 24px rgba(115, 80, 234, 0.2));
}

.rules-header .subtitle,
.privileges-header .subtitle,
.profile-header .subtitle,
.server-status-header .subtitle {
    position: relative;
    z-index: 1;
    color: #b6b2c7 !important;
}

.rules-card,
.profile-card,
.privilege-card,
.info-card {
    background: linear-gradient(145deg, rgba(22, 19, 43, 0.82), rgba(10, 9, 25, 0.76)) !important;
    border-color: var(--border-strong) !important;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.035);
}

.rules-card {
    overflow: hidden;
}

.rules-content {
    padding-left: 18px;
    border-left: 2px solid rgba(124, 92, 255, 0.42);
}

.nav-actions a,
.profile-nav a,
.back-link {
    backdrop-filter: var(--glass-soft);
    -webkit-backdrop-filter: var(--glass-soft);
}

.nav-actions a:hover,
.profile-nav a:hover {
    border-color: rgba(124, 92, 255, 0.5) !important;
    box-shadow: 0 8px 25px rgba(53, 56, 242, 0.18) !important;
}

.privilege-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.045), transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.75s ease;
    pointer-events: none;
}

.privilege-card:hover::after {
    transform: translateX(100%);
}

.account-item {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.045) !important;
}

.account-item::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(var(--violet), #3558f2);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.account-item:hover::before {
    opacity: 1;
}

.account-avatar {
    border: 1px solid rgba(200, 169, 255, 0.18);
    box-shadow: 0 8px 20px rgba(53, 56, 242, 0.16);
}

.profile-console {
    position: relative;
    border-color: rgba(124, 92, 255, 0.25) !important;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.42), 0 18px 50px rgba(0, 0, 0, 0.25) !important;
}

/* Live server status. */
.server-status-page {
    max-width: 900px !important;
    padding: 20px !important;
    margin: 0 auto !important;
}

.server-status-header {
    margin: 24px 0 18px;
    padding: 34px 20px;
    text-align: center;
}

.server-status-header h1 {
    margin: 0 0 8px !important;
}

.server-status-page .total-card {
    position: relative;
    overflow: hidden;
    padding: clamp(25px, 6vw, 45px);
    background:
        radial-gradient(circle at 50% 15%, rgba(53, 88, 242, 0.22), transparent 50%),
        linear-gradient(145deg, rgba(22, 19, 43, 0.9), rgba(10, 9, 25, 0.8));
    border: 1px solid rgba(93, 141, 255, 0.22);
    border-radius: var(--radius-xl);
    box-shadow: 0 22px 65px rgba(0, 0, 0, 0.35);
}

.server-status-page .total-number {
    font-size: clamp(3.8rem, 13vw, 6rem);
    line-height: 1;
    font-family: 'Futura Extra Bold', 'Futura PT Extra Bold', Futura, 'Montserrat', 'Arial Black', sans-serif;
    font-weight: 900;
    letter-spacing: -0.055em;
    background: linear-gradient(120deg, #fff, #70a5ff 50%, #c8a9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 22px rgba(93, 141, 255, 0.25));
}

.server-status-page .server-name,
.server-status-page .count {
    font-family: 'Futura Extra Bold', 'Futura PT Extra Bold', Futura, 'Montserrat', 'Arial Black', sans-serif;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.server-status-page .servers {
    gap: 12px;
}

.server-status-page .server {
    position: relative;
    overflow: hidden;
    padding: 18px 20px;
    background: linear-gradient(105deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
    border: 1px solid var(--border-strong);
    border-radius: 15px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.server-status-page .server::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--green);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
}

.server-status-page .server:hover {
    transform: translateY(-3px);
    border-color: rgba(93, 141, 255, 0.32);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
}

.server-status-page .server.offline::before {
    background: var(--red);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.55);
}

.server-status-page .server-ip,
.server-status-page .count {
    color: #79aaff;
}

.server-status-page .status-refresh {
    margin: 18px 0 5px;
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

/* Payment result and status pages. */
body.payment-body {
    min-height: 100vh;
}

.payment-page {
    width: min(100%, 760px);
    max-width: 760px !important;
    margin: 0 auto;
}

.payment-card {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 6vw, 38px) !important;
    margin-top: 28px !important;
    background:
        radial-gradient(circle at 50% -20%, rgba(115, 80, 234, 0.25), transparent 48%),
        linear-gradient(145deg, rgba(22, 19, 43, 0.92), rgba(10, 9, 25, 0.84)) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: 0 25px 75px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.04);
    backdrop-filter: var(--glass);
}

.payment-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--btn-gradient);
}

.payment-card h1 {
    font-size: clamp(1.55rem, 5vw, 2.1rem) !important;
    background: linear-gradient(110deg, #fff, #c8a9ff 48%, #5d8dff) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.payment-card .row {
    padding: 14px 2px !important;
    border-color: var(--border) !important;
}

.payment-card .value {
    color: #fff;
}

.payment-card .badge {
    border: 1px solid currentColor;
    border-radius: 999px !important;
}

.payment-card .btn {
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--btn-glow);
}

.payment-card .btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
    box-shadow: 0 10px 30px rgba(115, 80, 234, 0.4);
}

.payment-success-page {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start !important;
    padding: 0 20px 20px !important;
}

.payment-success-page > .header {
    width: 100%;
}

.payment-success-page .payment-card {
    width: min(100%, 560px);
    margin: 28px auto !important;
    text-align: center;
}

.payment-success-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    font-size: 2rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 22px;
    box-shadow: 0 0 32px rgba(16, 185, 129, 0.12);
}

@media (max-width: 640px) {
    .rules-page,
    .privileges-page,
    .profile-page,
    .server-status-page,
    .payment-page {
        padding: 12px !important;
    }

    .rules-header,
    .privileges-header,
    .profile-header,
    .server-status-header {
        padding: 28px 14px !important;
        margin-bottom: 18px !important;
    }

    .payment-card .row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px !important;
    }

    .payment-card .value {
        max-width: 100%;
        text-align: left !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .privilege-card::after {
        display: none;
    }
}
