/* AI3D mobile-first critical paint. Full component styles are deferred by front.js. */
html.ai3d-page-active,
body.ai3d-page-active {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    background: #151515;
}

body.ai3d-page-active {
    opacity: 1 !important;
    filter: none !important;
}

.ai3d-left-panel,
.ai3d-left-config-grid,
.ai3d-left-submit,
.ai3d-upload,
.ai3d-upload-panel,
.sec,
.ai3d-preview-stage,
.ai3d-preview-stage-viewport,
.ai3d-right-card {
    box-sizing: border-box;
}

.ai3d-upload,
.sec {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.ai3d-upload {
    min-height: 168px;
    cursor: pointer;
}

.ai3d-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ai3d-upload-empty,
.ai3d-upload-single,
.ai3d-upload-multi {
    display: none;
}

.ai3d-upload:not(.has-single):not(.has-multi):not(.is-multi) .ai3d-upload-empty {
    display: flex;
}

.ai3d-upload.has-single .ai3d-upload-single,
.ai3d-upload.has-multi .ai3d-upload-multi {
    display: block;
}

.ai3d-upload-empty {
    padding: 20px 14px;
    text-align: center;
    color: #dfe7f8;
}

.ai3d-upload-empty .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: rgba(64, 132, 255, 0.18);
    color: #dfe7f8;
}

.ai3d-upload-empty .btn .ai3d-upload-icon {
    position: static;
    flex: 0 0 auto;
    display: block;
    width: 22px;
    height: 22px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai3d-upload-empty p {
    margin: 4px 0 0;
    line-height: 1.45;
}

.ai3d-upload-empty p:first-of-type,
.lab {
    color: #fff;
    font-weight: 700;
}

.sec {
    margin-top: 10px;
    padding: 12px;
}

.lab {
    margin-bottom: 6px;
    font-size: 13px;
}

.ai3d-select,
.ai3d-input,
.ai3d-render-mode-select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #141922;
    color: #eef3ff;
    font-size: 14px;
}

.ai3d-check,
.ai3d-subtoggle,
.ai3d-seg,
.ai3d-face-count-row {
    min-width: 0;
    min-height: 44px;
}

.ai3d-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ai3d-generate {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--xl-theme-accent-2, #d4a843), #36b7ff);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.ai3d-generate-wrap {
    position: relative;
}

.ai3d-generate-vip-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 18px;
    padding: 0 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #9c4b10, #ff9d3c);
    color: #fff7de;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    pointer-events: none;
}

.ai3d-generate:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.ai3d-preview-stage-viewport {
    position: relative;
    border-radius: 14px;
    background: radial-gradient(circle at 50% 82%, rgba(91, 132, 183, 0.14), transparent 34%), #202326;
}

@media screen and (max-width: 640px) {
    .ai3d-upload {
        min-height: 148px;
    }

    .sec {
        padding: 10px;
    }
}
