:root {
    --zt-bg: #0D0D0F;
    --zt-panel: #141416;
    --zt-card: #1B1B1F;
    --zt-card-soft: rgba(27, 27, 31, 0.95);
    --zt-border: #242428;
    --zt-border-gold: rgba(217, 177, 95, 0.35);
    --zt-gold: #F0C870;
    --zt-gold-2: #D9B15F;
    --zt-text: #E8EEF7;
    --zt-muted: #A7B0C0;
    --zt-danger: #EF4444;
    --zt-success: #48D17A;
    --zt-radius: 18px;
    --zt-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--zt-bg);
    scroll-behavior: smooth;
}

body {
    background: var(--zt-bg);
    color: var(--zt-text);
    overflow-x: hidden;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

button,
input,
textarea,
select {
    font-family: var(--site-font) !important;
}

button {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(217, 177, 95, 0.22);
    line-height: 1.18;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    transform-origin: center;
    transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
    will-change: transform;
}

button:not(:disabled):hover {
    transform: scale(1.04);
    filter: brightness(1.08);
    box-shadow: 0 14px 34px rgba(217, 177, 95, 0.28);
}

button:not(:disabled):active {
    transform: scale(0.97);
    filter: brightness(0.96);
}

nav button:not(:disabled):hover,
.main .right button:not(:disabled):hover,
.total-screen button:not(:disabled):hover,
.card-modal button:not(:disabled):hover,
.components-content button:not(:disabled):hover,
.main-content button:not(:disabled):hover {
    transform: scale(1.04) !important;
    filter: brightness(1.08);
    box-shadow: 0 14px 34px rgba(217, 177, 95, 0.28) !important;
}

nav button:not(:disabled):active,
.main .right button:not(:disabled):active,
.total-screen button:not(:disabled):active,
.card-modal button:not(:disabled):active,
.components-content button:not(:disabled):active,
.main-content button:not(:disabled):active {
    transform: scale(0.97) !important;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

textarea,
input,
select {
    line-height: 1.35;
}

textarea:focus,
input:focus,
select:focus {
    border-color: rgba(240, 200, 112, 0.65) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 200, 112, 0.12), 0 0 12px 4px rgba(255, 255, 255, 0.015) inset !important;
}

nav .logo-cont,
footer .logo-cont {
    gap: 10px !important;
    min-width: 0;
}

.site-logo {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 auto;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(217, 177, 95, 0.08);
    border: 1px solid rgba(217, 177, 95, 0.28);
}

.site-logo[hidden] {
    display: none !important;
}

footer .site-logo {
    width: 44px !important;
    height: 44px !important;
    border-radius: 14px;
}

nav .logo-cont p,
footer .logo-cont p {
    line-height: 1;
    white-space: nowrap;
}

nav a,
footer a,
.nav a,
.available-on-sale,
.components-cont .components-row .filters div,
.components-cont .components-row .filters-cont .all,
.components-cont .components-row .all-components .item,
.suggestion-item {
    transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

nav a:hover,
footer a:hover,
.nav a:hover {
    color: var(--zt-gold) !important;
    text-decoration: none !important;
}

.catalog .card,
.main-content .card,
.components-cont,
.total-screen,
.card-modal .card-content,
.components-content .edit-component-cont {
    border-color: rgba(217, 177, 95, 0.18) !important;
    box-shadow: var(--zt-shadow), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.catalog .card,
.main-content .card {
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.catalog .card:hover,
.main-content .card:hover {
    transform: translateY(-4px);
    border-color: rgba(240, 200, 112, 0.45) !important;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(240, 200, 112, 0.16) inset;
}

.catalog .card button,
.main-content .card button {
    min-height: 40px;
}

.main .button-cont {
    align-items: stretch;
    flex-wrap: wrap;
}

.main .open-catalog,
.main .legacy {
    width: auto !important;
    min-width: 170px;
    min-height: 46px;
    padding: 0 20px;
}

.main .right button,
.total-screen button,
nav button {
    padding: 0 18px;
}

.nav {
    border-bottom: 0;
}

.nav .content {
    flex-wrap: wrap;
    justify-content: center;
}

.main-content {
    background:
        radial-gradient(circle at top left, rgba(240, 200, 112, 0.08), transparent 30%),
        linear-gradient(180deg, #101012 0%, #0D0D0F 100%) !important;
}

.admin-status {
    display: none;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(240, 200, 112, 0.24);
    background: rgba(240, 200, 112, 0.08);
    color: var(--zt-text);
    line-height: 1.35;
}

.admin-status.show {
    display: flex;
}

.admin-status.error {
    border-color: rgba(239, 68, 68, 0.42);
    background: rgba(239, 68, 68, 0.1);
}

.admin-status.success {
    border-color: rgba(72, 209, 122, 0.38);
    background: rgba(72, 209, 122, 0.1);
}

.admin-lock {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at top, rgba(240, 200, 112, 0.12), transparent 36%),
        rgba(10, 10, 12, 0.96);
    backdrop-filter: blur(18px);
}

.admin-login {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px;
    border: 1px solid rgba(217, 177, 95, 0.26);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(27, 27, 31, 0.98) 0%, rgba(20, 20, 22, 0.98) 100%);
    box-shadow: var(--zt-shadow);
}

.admin-login h2 {
    color: var(--zt-text);
    font-size: 24px;
}

.admin-login p {
    color: var(--zt-muted);
    font-size: 12px;
    line-height: 1.5;
}

.admin-login input {
    min-height: 48px;
    padding: 0 14px;
    color: var(--zt-text);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

.admin-login .login-error {
    display: none;
    color: #FFD1D1;
    font-size: 12px;
}

.admin-login .login-error.show {
    display: block;
}

.bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.bulk-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--zt-muted);
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.bulk-select input,
.item-select {
    width: 18px;
    height: 18px;
    accent-color: var(--zt-gold);
}

.item-select-wrap {
    position: absolute;
    z-index: 5;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(10, 10, 12, 0.76);
    border: 1px solid rgba(240, 200, 112, 0.24);
}

.component-card,
.card {
    position: relative;
}

.bulk-delete-button {
    min-height: 38px;
    font-size: 12px;
}

@media (max-width: 560px) {
    .bulk-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-delete-button {
        width: 100%;
    }
}

.danger-button {
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.42) !important;
    color: #FFD1D1 !important;
    box-shadow: none !important;
}

.danger-button:not(:disabled):hover {
    filter: brightness(1.08);
    box-shadow: 0 14px 34px rgba(239, 68, 68, 0.2) !important;
}

.ghost-button {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--zt-text) !important;
    box-shadow: none !important;
}

.image-remove {
    position: absolute;
    z-index: 4;
    right: 8px;
    top: 8px;
    width: 34px !important;
    min-width: 34px;
    height: 34px !important;
    min-height: 34px;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(10, 10, 12, 0.72) !important;
    color: #FFE1E1 !important;
    border: 1px solid rgba(239, 68, 68, 0.44) !important;
    box-shadow: none !important;
}

.image-remove:hover {
    color: #FFFFFF !important;
    background: rgba(239, 68, 68, 0.86) !important;
}

.input-and-img-cont,
.main-img {
    overflow: hidden;
}

@media (max-width: 900px) {
    nav,
    footer,
    .main {
        padding-left: clamp(16px, 5vw, 35px) !important;
        padding-right: clamp(16px, 5vw, 35px) !important;
    }

    nav {
        gap: 12px;
    }

    nav button {
        width: auto !important;
        min-width: 140px;
    }

    .main .right {
        border-radius: 28px !important;
    }
}

@media (max-width: 560px) {
    .site-logo {
        width: 28px !important;
        height: 28px !important;
        border-radius: 8px;
    }

    nav .logo-cont p {
        font-size: 18px !important;
    }

    nav button {
        min-width: 112px;
        max-width: 135px;
        min-height: 38px;
        padding: 0 10px;
        font-size: 11px !important;
    }

    .main .button-cont {
        width: 100%;
        flex-direction: column;
    }

    .main .open-catalog,
    .main .legacy {
        width: 100% !important;
        min-width: 0;
        min-height: 44px;
        font-size: 13px !important;
    }

    .total-screen .prize-and-button .prize-cont {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .total-screen button,
    .main .right button {
        width: 100% !important;
        max-width: none !important;
        min-height: 44px;
        font-size: 12px !important;
    }

    .catalog .card,
    .main-content .card {
        width: min(100%, 300px) !important;
        height: auto !important;
        min-height: 430px;
    }

    .catalog,
    .main .catalog,
    .main-content .card-content {
        justify-content: center;
    }
}
