@font-face {
    font-family: "RoundOr";
    src: url(/Media/Fonts/RoundOr.otf);
}

@font-face {
    font-family: "NEXDDisplay";
    src: url(/Media/Fonts/NEXD.otf);
}

:root {
    --size-factor: 1;
    --container-max-width: 1180px;
    --container-width: min(calc(100vw - 32px), 1180px);
    --font-main: "RoundOr", "Segoe UI", sans-serif;
    --font-logo: "NEXDDisplay", "RoundOr", "Segoe UI", sans-serif;
    --font-size: 16px;
    --border-radius: 14px;
    --border-radius-large: 22px;
    --color-accent-r: 106;
    --color-accent-g: 164;
    --color-accent-b: 255;
    --color-accent: rgba(106, 164, 255, 1);
    --color-accent-light: rgba(138, 212, 252, 1);
    --color-accent-superlight: rgba(206, 233, 255, 1);
    --color-accent-dark: rgba(74, 122, 204, 1);
    --color-complimentary-r: 254;
    --color-complimentary-g: 246;
    --color-complimentary-b: 195;
    --color-complimentary: rgba(254, 246, 195, 1);
    --color-complimentary-light: rgba(255, 250, 219, 1);
    --color-complimentary-dark: rgba(232, 217, 154, 1);
    --color-background-r: 11;
    --color-background-g: 18;
    --color-background-b: 32;
    --color-background: rgba(11, 18, 32, 1);
    --color-background-light: rgb(17, 27, 46);
    --color-background-dark: rgb(7, 12, 21);
    --color-background-trans: rgba(11, 18, 32, 0.88);
    --color-background-light-trans: rgba(17, 27, 46, 0.88);
    --color-background-dark-trans: rgba(7, 12, 21, 0.88);
    --color-background-alternate-r: 16;
    --color-background-alternate-g: 27;
    --color-background-alternate-b: 46;
    --color-background-alternate: rgba(16, 27, 46, 1);
    --color-background-alternate-light: rgba(23, 38, 64, 1);
    --color-background-alternate-dark: rgba(9, 17, 30, 1);
    --background-gradient-trans: linear-gradient(180deg, rgba(7, 12, 21, 0.94) 0%, rgba(11, 18, 32, 0.92) 100%);
    --background-gradient: linear-gradient(180deg, rgba(16, 27, 46, 0.96) 0%, rgba(9, 17, 30, 0.96) 100%);
    --background-alternate-gradient: linear-gradient(180deg, rgba(20, 35, 60, 0.96) 0%, rgba(10, 18, 31, 0.96) 100%);
    --accent-gradient: linear-gradient(135deg, rgba(254, 246, 195, 1) 0%, rgba(244, 213, 155, 1) 100%);
    --theme-text: #d2dff9;
    --theme-muted: #cad5ec;
    --theme-border: rgba(126, 167, 255, 0.2);
    --theme-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --theme-panel: linear-gradient(180deg, rgba(16, 27, 46, 0.94), rgba(9, 17, 30, 0.96)), url(/Codex/images/container-texture.webp);
    --outline: 2px solid rgba(138, 212, 252, 0.85);
}

html {
    background:
        linear-gradient(180deg, rgba(7, 12, 21, 0.62) 0%, rgba(8, 14, 25, 0.68) 28%, rgba(10, 19, 34, 0.72) 100%),
        radial-gradient(circle at top left, rgba(80, 130, 255, 0.14), transparent 32%),
        radial-gradient(circle at top right, rgba(134, 212, 255, 0.1), transparent 24%),
        url(/Codex/images/phMonitor-bg.webp) center top / cover fixed no-repeat !important;
}

body {
    padding: 108px 0 0 0;
    overflow-x: hidden;
    color: var(--theme-text);
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 16px;
    color: var(--theme-text);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h1 {
    font-size: clamp(32px, 4vw, 44px);
}

h2 {
    font-size: clamp(28px, 3.2vw, 38px);
}

h3,
h4,
h5,
h6 {
    color: var(--color-complimentary);
}

p,
label,
sub,
span,
th,
td {
    color: var(--theme-muted);
}

.container {
    width: var(--container-width);
    max-width: var(--container-max-width);
}

.main {
    min-height: calc(100vh - 360px);
}

c-m-s {
    display: block;
    width: var(--container-width);
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.theme-page {
    display: grid;
    gap: 24px;
    padding-top: 8px;
}

.theme-surface,
.theme-maintenance,
.news-wrapper-outer,
.cookies-inner,
.popup,
.register-wrapper,
.login-wrapper,
.footer-grid {
    border: 1px solid var(--theme-border);
    background: var(--theme-panel);
    background-size: cover;
    border-radius: var(--border-radius-large);
    box-shadow: var(--theme-shadow);
}

.theme-surface {
    padding: 28px;
}

.theme-form {
    gap: 18px !important;
}

.theme-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(126, 167, 255, 0.18);
    background: rgba(7, 12, 21, 0.88);
    color: var(--theme-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder,
textarea::placeholder {
    color: rgba(210, 223, 249, 0.5);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--color-accent-light);
}

input:focus,
select:focus,
textarea:focus {
    outline: var(--outline);
    border-color: rgba(138, 212, 252, 0.65);
}

button,
input[type="submit"],
.btn-light,
.btn-semi,
.btn-heavy,
.dropdown .dropdown-content a {
    border: 1px solid transparent;
    border-radius: var(--border-radius) !important;
    background: var(--accent-gradient) !important;
    color: #08101d !important;
    box-shadow: 0 12px 30px rgba(215, 177, 109, 0.2);
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

button:hover,
input[type="submit"]:hover,
.btn-light:hover,
.btn-semi:hover,
.btn-heavy:hover,
.dropdown .dropdown-content a:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(215, 177, 109, 0.24);
}

.btn-light {
    padding: 10px 16px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--theme-text) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

.btn-light::after {
    display: none !important;
}

.btn-light span,
.btn-semi span,
.btn-heavy span,
button span {
    color: inherit !important;
}

.btn-semi {
    padding: 2px !important;
}

.btn-semi span,
.btn-heavy span {
    background: transparent !important;
    color: inherit !important;
}

.disabled,
.disabled span {
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(202, 213, 236, 0.45) !important;
    box-shadow: none !important;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 18px 0 0;
    background: none !important;
}

.header-center {
    position: static;
    min-width: 0;
    width: 100%;
    height: auto;
    padding: 14px 18px;
    border-radius: 20px;
    border-image: none;
    background: rgba(8, 14, 25, 0.72);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.header-main-nav {
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
}

.header-main-nav-left {
    position: static;
    width: auto;
    height: auto;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.header-logo {
    display: block;
    height: 64px;
    width: auto;
    padding: 0;
    margin: 0;
    border-radius: 14px;
    background: none;
    box-shadow: none;
}

.site-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-brand-copy strong {
    font-family: var(--font-main);
    color: var(--color-complimentary);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.site-brand-copy span {
    color: var(--theme-muted);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-main-nav-center {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    min-width: 0;
    height: auto;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px !important;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.02);
}

.nav-link span {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    display: inline;
    width: auto !important;
    color: var(--theme-muted);
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    border-color: rgba(138, 212, 252, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.nav-link:hover span,
.nav-link.active span {
    color: var(--theme-text);
}

.nav-link--accent {
    background: var(--accent-gradient);
}

.nav-link--accent span {
    color: #08101d !important;
}

.nav-link--accent.active span,
.nav-link--accent:hover span {
    color: #08101d !important;
}

.header-main-nav .main-nav-elem a i,
.header-main-nav .main-nav-elem a img,
.header-main-nav .main-nav-elem div i,
.header-left,
.header-right,
.header-mesh-wrapper,
.header-accent-nav-edge {
    display: none !important;
}

.mobile-open,
.mobile-close {
    color: var(--color-complimentary);
}

footer {
    margin-top: 56px;
    padding: 0 0 48px;
    background: none;
    box-shadow: none;
}

.theme-footer {
    padding-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr 0.9fr 0.9fr;
    gap: 24px;
    padding: 28px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.footer-brand h5 {
    margin-bottom: 8px;
}

.footer-note {
    margin: 0;
    line-height: 1.7;
    color: var(--theme-muted);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links h6 {
    margin-bottom: 8px;
    color: var(--color-complimentary);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-links a {
    color: var(--theme-muted);
    text-decoration: none;
}

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

.news-wrapper-outer {
    padding: 28px !important;
}

.news-wrapper {
    align-items: start;
    gap: 24px !important;
}

.news-wrapper .cms-image {
    width: min(100%, 300px);
    max-height: 320px !important;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.news-content .news-content-fade {
    background: linear-gradient(180deg, rgba(8, 16, 29, 0) 0%, rgba(8, 16, 29, 1) 100%) !important;
}

.news-trigger-wrapper {
    padding: 8px 14px !important;
    border-radius: 999px;
    border: 1px solid rgba(138, 212, 252, 0.18) !important;
    background: rgba(8, 14, 25, 0.86) !important;
}

.news-trigger-wrapper span,
.news-trigger-wrapper i {
    color: var(--color-complimentary) !important;
}

.newsletter-layout,
.newsletter-box {
    gap: 20px !important;
}

.newsletter-box {
    padding: 24px !important;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.newsletter-types-wrapper {
    padding: 16px !important;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.cookies-screen-background {
    background: rgba(3, 7, 14, 0.82);
    backdrop-filter: blur(10px);
}

.cookies-wrapper {
    width: min(calc(100vw - 32px), 980px);
}

.cookies-inner {
    padding: 28px;
    background-size: cover;
}

.cookies-headline {
    color: var(--color-complimentary);
}

.cookies-text,
.cookie-description,
.cookie-keys,
.cookie-info-header span,
.cookies-text-headline span {
    color: var(--theme-muted) !important;
}

.cookies-list {
    max-height: 340px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(7, 12, 21, 0.52);
}

.cookies-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.cookies-nav .btn-light {
    margin: 0 !important;
}

.theme-maintenance {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    max-width: 720px;
    margin: 10vh auto 0;
    padding: 32px !important;
}

.login-wrapper {
    overflow: hidden;
}

.login-left {
    background:
        linear-gradient(180deg, rgba(7, 12, 21, 0.35), rgba(7, 12, 21, 0.7)),
        radial-gradient(circle at top left, rgba(80, 130, 255, 0.22), transparent 30%),
        url(/Codex/images/phMonitor-bg.webp) center center / cover no-repeat !important;
}

.login-left .logo,
.login-form-logo {
    background-image: url(/Codex/images/phMonitor-logo.webp) !important;
}

.login-right {
    background: var(--background-gradient) !important;
    border-left: 1px solid var(--theme-border);
}

.login-form-signup {
    position: static;
    width: 100% !important;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 16px !important;
}

.login-form-actions {
    gap: 12px !important;
}

.register-wrapper {
    padding: 24px !important;
    gap: 24px !important;
    align-items: stretch !important;
}

.register-form-wrapper,
.register-banner {
    border-radius: 18px;
}

.register-form-inner {
    backdrop-filter: blur(18px);
    background: linear-gradient(180deg, rgba(16, 27, 46, 0.9), rgba(9, 17, 30, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 1px solid rgba(138, 212, 252, 0.22);
}

.register-banner {
    min-height: 100%;
    background:
        linear-gradient(180deg, rgba(7, 12, 21, 0.28), rgba(7, 12, 21, 0.65)),
        url(/Codex/images/features-overview.webp) center center / cover no-repeat !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--theme-shadow);
}

.register-form-info {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

#account-settings {
    width: 100%;
    border-spacing: 0 14px;
}

#account-settings tr td {
    padding: 16px;
    background: rgba(7, 12, 21, 0.48);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#account-settings tr td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px 0 0 16px;
}

#account-settings tr td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 16px 16px 0;
}

.inline-text,
.inline-image-text {
    background: rgba(255, 255, 255, 0.04);
    color: var(--theme-text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.inline-image-text span {
    color: var(--theme-text);
}

table {
    border-spacing: 0 12px;
}

thead th {
    padding: 0 12px 8px 0;
}

tbody tr td,
tbody tr th {
    color: var(--theme-muted);
}

.popup {
    padding: 24px;
}

@media only screen and (max-width: 980px) {
    body {
        padding-top: 94px;
    }

    .header-main-nav {
        align-items: flex-start !important;
    }

    .header-main-nav-center {
        position: fixed;
        top: 86px;
        right: 16px;
        width: min(320px, calc(100vw - 32px));
        padding: 18px;
        flex-direction: column;
        align-items: stretch !important;
        border-radius: 18px;
        background: rgba(8, 14, 25, 0.94);
        border: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
    }

    .header-main-nav-center.hidden {
        display: none !important;
    }

    .header-main-nav-center::after {
        display: none !important;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .mobile-open {
        display: block !important;
        margin-top: 12px;
        font-size: 26px;
        color: var(--color-complimentary) !important;
    }

    .mobile-close {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: static;
        width: 40px;
        height: 40px;
        margin-left: auto;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.06);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .news-wrapper {
        grid-template-columns: 1fr;
        display: grid;
    }

    .login-wrapper,
    .register-wrapper {
        width: 100%;
        min-width: 100%;
    }
}

@media only screen and (max-width: 800px) {
    c-m-s {
        width: min(calc(100vw - 24px), 1180px);
    }

    .theme-surface,
    .news-wrapper-outer,
    .cookies-inner,
    .footer-grid {
        padding: 22px;
    }

    .register-wrapper {
        grid-template-columns: 1fr;
    }

    .site-brand-copy span {
        display: none;
    }
}
