/* Critical local fallback styles.
   This file intentionally has no @import and no CDN dependency. */

:root {
    --font-primary: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --navbar-height: 84px;
    --main-content-gap: 0.95rem;
    --color-body-bg: radial-gradient(circle at 15% 20%, rgba(99, 179, 237, 0.14) 0%, rgba(99, 179, 237, 0) 48%),
                     radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.12) 0%, rgba(34, 211, 238, 0) 45%),
                     linear-gradient(155deg, rgba(5, 23, 49, 0.82) 0%, rgba(10, 46, 94, 0.84) 48%, rgba(15, 69, 132, 0.86) 100%);
    --color-text: #e8f3ff;
    --color-navbar-bg: linear-gradient(120deg, rgba(6, 27, 58, 0.9), rgba(14, 62, 117, 0.86));
    --color-navbar-text: #f3f9ff;
    --color-table-bg: linear-gradient(160deg, rgba(7, 24, 51, 0.72), rgba(13, 52, 104, 0.62));
    --color-button-bg: linear-gradient(135deg, #2382d6, #31a5ef);
    --color-card-bg: linear-gradient(160deg, rgba(8, 26, 57, 0.75), rgba(18, 70, 122, 0.68));
    --color-status-up: #62e68f;
    --color-status-down: #ff7a7a;
    --btn-primary-color: #f8fcff;
    --surface-border: rgba(145, 206, 255, 0.28);
    --surface-shadow: 0 20px 55px rgba(3, 11, 31, 0.42);
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--color-text);
    background-image: url('/itchio-mainRes/resources/images/itchio/BackgroundFlatItchio2025%20End.png'), var(--color-body-bg);
    background-size: 540px auto, cover;
    background-repeat: repeat, no-repeat;
    background-attachment: fixed, fixed;
    background-position: top left, center center;
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.55;
    overflow-x: hidden;
}

body,
input,
button,
textarea,
select,
option,
.dropdown-menu,
.dropdown-item {
    font-family: var(--font-primary);
}

a,
a:hover {
    color: inherit;
    text-decoration: none;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.custom-navbar {
    position: fixed;
    z-index: 1100;
    top: 10px;
    left: 50%;
    width: min(1280px, calc(100% - 1rem));
    transform: translateX(-50%);
    color: var(--color-navbar-text);
    background: var(--color-navbar-bg);
    border: 1px solid rgba(129, 200, 255, 0.36);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(3, 13, 32, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.custom-navbar .container-fluid {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.24rem 0.68rem;
}

.custom-navbar .navbar-brand,
.custom-navbar .nav-link {
    color: var(--color-navbar-text) !important;
}

.custom-navbar .nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.56rem;
    border-radius: 10px;
    font-size: 0.89rem;
    font-weight: 500;
    white-space: nowrap;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link:focus,
.custom-navbar .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(145deg, rgba(43, 184, 255, 0.28), rgba(25, 122, 205, 0.35));
}

.umx-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.umx-brand-logo {
    display: block;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    min-width: 39px;
    max-width: 39px;
    max-height: 39px;
    object-fit: contain;
}

.umx-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.umx-brand-title {
    color: #f7fcff;
    font-size: 1.1rem;
    font-weight: 700;
}

.umx-brand-subtitle {
    font-size: 0.41rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 0.8;
}

.dropdown-menu {
    min-width: 230px;
    padding: 0.35rem;
    color: #eaf7ff !important;
    background: linear-gradient(175deg, rgba(4, 29, 65, 0.98), rgba(14, 71, 132, 0.96)) !important;
    border: 1px solid rgba(130, 209, 255, 0.25);
    border-radius: 12px;
    box-shadow: 0 18px 35px rgba(2, 15, 37, 0.55);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(236, 247, 255, 0.92) !important;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    color: #ffffff !important;
    background: linear-gradient(145deg, rgba(41, 167, 255, 0.24), rgba(17, 105, 185, 0.24));
}

.special-cloud-link {
    color: #f8fdff !important;
    border-radius: 10px;
    background: linear-gradient(120deg, #1a85d7 0%, #1d9de2 45%, #1bc5c5 100%);
}

.main-content {
    position: relative;
    width: min(1480px, calc(100% - 0.8rem));
    min-height: min(82vh, 1000px);
    margin: calc(var(--navbar-height) + var(--main-content-gap)) auto 1.5rem;
    padding: clamp(1rem, 2.3vw, 2rem);
    color: var(--color-text);
    background: linear-gradient(155deg, rgba(5, 21, 44, 0.311), rgba(23, 56, 96, 0.54));
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    box-shadow: var(--surface-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.plugin-window {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-top: 0.35rem;
}

.plugins-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.plugins-title,
.plugins-title-primary,
.plugins-title-secondary,
#pluginCount {
    color: var(--color-text) !important;
}

.plugins-title {
    display: inline-flex;
    align-items: center;
    flex: 1 1 260px;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0;
    font-size: clamp(1.3rem, 2.3vw, 1.75rem);
    line-height: 1.15;
}

.plugins-title-separator-dot {
    width: 0.52rem;
    height: 0.52rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #a8f1ff 0%, #4ad6ff 45%, #0f8dd2 100%);
    box-shadow: 0 0 0 1px rgba(167, 235, 255, 0.42), 0 0 14px rgba(55, 198, 255, 0.5);
}

.plugin-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-primary,
.filter-btn.btn.btn-primary {
    color: var(--btn-primary-color) !important;
    background: var(--color-button-bg) !important;
    border: 0 !important;
    border-radius: 12px;
}

.filter-btn.btn.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 172px;
    max-width: 210px;
    padding: 0.72rem 1.1rem;
    gap: 0.35rem;
    white-space: nowrap;
}

#searchBox,
#filterBox {
    height: 3em;
    padding: 10px;
    color: #ffffff;
    background: linear-gradient(180deg, #5db0c911, #1145a022);
    border: 0;
    border-radius: 10px;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.2);
}

#searchBox::placeholder {
    color: #ffffff;
    opacity: 1;
}

.status-card,
.status-loader {
    width: 100%;
    max-width: 560px;
    color: var(--color-text);
    background: var(--color-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
}

.status-card {
    display: flex;
    flex-direction: column;
    gap: 0.62rem;
    padding: 1rem 1.5rem;
}

.status-loader {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.service-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-row p,
.status-card p {
    margin-bottom: 0;
}

.service-row.up p {
    color: var(--color-status-up);
}

.service-row.down p {
    color: var(--color-status-down);
}

.service-row.unknown p {
    color: #f6d17d;
}

.service-row p strong {
    color: var(--color-text);
}

.status-dot {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(195, 238, 255, 0.74);
}

.status-dot.up {
    background: radial-gradient(circle at 28% 30%, #bdf8d0 0%, var(--color-status-up) 52%, #2eb96b 100%);
}

.status-dot.down {
    background: radial-gradient(circle at 30% 30%, #ffc0c0 0%, var(--color-status-down) 55%, #d54545 100%);
}

.status-dot.unknown {
    background: radial-gradient(circle at 30% 30%, #ffeebd 0%, #f6d17d 55%, #d8a73b 100%);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.plugin-table {
    width: 100%;
    color: rgba(255, 255, 255, 0.9) !important;
    background: var(--color-table-bg);
    border-collapse: collapse;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.plugin-table th,
.plugin-table td,
.plugin-name {
    color: #ffffff !important;
}

.plugin-table th,
.plugin-table td {
    padding: 14px 15px;
    border: 0 !important;
}

.plugin-image {
    width: 130px;
    max-width: 130px;
    height: auto;
    margin-right: 15px;
    border-radius: 8px;
}

.plugin-info {
    display: flex;
    align-items: center;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    margin-right: 5px;
    color: #ffffff;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
}

.footer {
    margin-top: 1.65rem;
    color: #e6f2ff;
    font-size: 0.9rem;
}

.footer-shell {
    max-width: 100%;
    padding: 1.4rem 1.2rem 1.1rem;
    background: linear-gradient(160deg, rgba(4, 24, 52, 0.82), rgba(11, 53, 101, 0.72));
    border: 1px solid rgba(136, 205, 255, 0.25);
    border-radius: 18px;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin-bottom: 0.45rem;
}

.footer-logo {
    display: block;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    max-width: 58px;
    max-height: 58px;
    object-fit: contain;
}

.footer-brand-copy {
    text-align: left;
}

.footer-brand-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.1;
}

.footer-brand-sub {
    display: block;
    font-size: 0.41rem;
    opacity: 0.8;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
}

@media (max-width: 991px) {
    .custom-navbar {
        top: 4px;
        width: calc(100% - 0.6rem);
        border-radius: 14px;
    }

    .custom-navbar .container-fluid {
        padding: 0.32rem 0.65rem;
    }

    .custom-navbar .navbar-collapse {
        background: linear-gradient(160deg, rgba(7, 33, 67, 0.94), rgba(14, 69, 128, 0.9));
        border: 1px solid rgba(129, 200, 255, 0.24);
        border-radius: 12px;
        padding: 0.5rem;
        margin-top: 0.55rem;
    }

    .custom-navbar .nav-link {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .main-content {
        width: calc(100% - 0.25rem);
        margin-top: calc(var(--navbar-height) + 0.45rem);
        padding: 0.72rem;
        border-radius: 16px;
    }

    .plugin-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .plugin-toolbar .form-group {
        width: 100%;
        order: 3;
    }

    .filter-btn.btn.btn-primary {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}
