body {
    min-height: 100vh;
}

body.modal-open {
    overflow: hidden;
}

body.modal-open,
body.modal-open.page-ready,
body.modal-open.page-leaving {
    transform: none;
    transition: none;
}

.page-overlay {
    min-height: 100vh;
    padding-bottom: 60px;
}

.container {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-main,
.btn-download {
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s ease;
}

#user-info-display {
    display: none;
    align-items: center;
    gap: 12px;
}

.kreator-hero {
    padding: 90px 0 54px;
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    align-items: center;
    gap: 60px;
}

.skin-box {
    display: flex;
    justify-content: center;
}

.skin-box img {
    max-width: 100%;
    width: min(360px, 100%);
    filter: drop-shadow(0 24px 44px rgba(255, 42, 133, 0.28));
    animation: floatSkin 4s ease-in-out infinite;
}

.info-card {
    padding: 44px;
    border-radius: 32px;
    border: 1px solid rgba(255, 42, 133, 0.2);
    background: rgba(18, 18, 24, 0.86);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.info-card h2 {
    margin: 0 0 18px;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.info-card p {
    margin: 0 0 26px;
    color: var(--text-dim);
    line-height: 1.8;
}

.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
    border-radius: 18px;
    background: var(--gradient);
    color: white;
    font-weight: 800;
}

.filters-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 34px;
}

.filter-btn {
    padding: 12px 24px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    cursor: pointer;
    font-weight: 700;
}

.filter-btn.active,
.filter-btn:hover {
    background: rgba(255, 42, 133, 0.14);
    border-color: rgba(255, 42, 133, 0.34);
    color: white;
}

.items-grid {
    display: grid;
    gap: 24px;
}

.empty-state,
.empty-table {
    padding: 24px;
    color: var(--text-dim);
    text-align: center;
}

.item-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    border-radius: 28px;
    border: 1px solid var(--border);
    background: rgba(18, 18, 24, 0.9);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.item-card:hover,
.item-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(255, 42, 133, 0.28);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
    outline: none;
}

.item-img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.02);
}

.item-img-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-dim);
    min-height: 100%;
    padding: 28px;
}

.item-body {
    padding: 28px 30px;
}

.item-tag {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 42, 133, 0.12);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.item-title {
    margin: 14px 0 8px;
    font-size: 1.32rem;
}

.item-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 8px 0 14px;
}

.item-price-label {
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
}

.item-price-value {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: white;
}

.item-desc,
.item-instructions {
    color: var(--text-dim);
    line-height: 1.75;
}

.item-instructions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    white-space: pre-line;
}

.item-panel-note {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 42, 133, 0.08);
    border: 1px solid rgba(255, 42, 133, 0.16);
    color: var(--text-dim);
    line-height: 1.7;
}

.details-modal {
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.details-card {
    position: relative;
    width: min(1120px, calc(100vw - 36px));
    max-height: calc(100vh - 40px);
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
    gap: 28px;
    padding: 28px;
    border-radius: 30px;
    border: 1px solid rgba(255, 42, 133, 0.2);
    background: rgba(16, 16, 22, 0.97);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
    overflow: auto;
}

.details-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: white;
    cursor: pointer;
}

.details-gallery {
    display: grid;
    gap: 14px;
}

.details-main-image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

#details-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.details-main-empty {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-dim);
}

.details-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, 82px);
    gap: 10px;
}

.details-thumb {
    width: 82px;
    height: 82px;
    aspect-ratio: 1 / 1;
    flex: none;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.details-thumb.active {
    border-color: rgba(255, 42, 133, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 42, 133, 0.18);
}

.details-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.details-content {
    display: grid;
    align-content: start;
    gap: 18px;
}

.details-topline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 56px;
}

.details-price {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 42, 133, 0.12);
    color: white;
    font-size: 0.92rem;
    font-weight: 800;
}

.details-content h3 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.details-description,
.details-section {
    color: var(--text-dim);
    line-height: 1.75;
}

.details-section {
    display: grid;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    white-space: pre-line;
}

.details-files {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.details-file {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(10px);
    z-index: 11000;
}

.auth-box {
    position: relative;
    width: min(460px, 100%);
    padding: 34px;
    border-radius: 28px;
    border: 1px solid rgba(255, 42, 133, 0.22);
    background: rgba(16, 16, 22, 0.96);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
    transform: translateY(-4vh);
}

.auth-box h2 {
    margin: 0 0 18px;
    font-size: 2rem;
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--text-dim);
    cursor: pointer;
}

.input-group {
    margin-bottom: 14px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0d0d12;
    color: white;
}

.auth-switch {
    margin-top: 14px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.auth-switch span {
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

.auth-submit {
    width: 100%;
    justify-content: center;
}

@keyframes floatSkin {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

@media (max-width: 940px) {
    .kreator-hero {
        grid-template-columns: 1fr;
    }

    .item-card {
        grid-template-columns: 1fr;
    }

    .details-card {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .item-img,
    .item-img-empty {
        min-height: 240px;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(1240px, calc(100% - 24px));
    }

    .info-card {
        padding: 28px 22px;
    }

    .auth-box {
        padding: 28px 22px;
        transform: none;
    }
}
