/* ============================================
   Generator CSS — универсальные стили для /t/{slug}
   ============================================ */

/* ---------- Root ---------- */
:root {
    --gen-primary: #4361ee;
    --gen-primary-dark: #3651d4;
    --gen-bg: #f7f8fc;
    --gen-card-border: rgba(0,0,0,.06);
    --gen-shadow: 0 .25rem .75rem rgba(0,0,0,.06);
}

/* body {
    background-color: var(--gen-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
} */

main { flex: 1; }

/* ---------- Upload Zone ---------- */
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: .75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fafbff;
}
.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--gen-primary);
    background: #eef1ff;
}
.upload-icon {
    font-size: 2rem;
    color: #aab2c5;
    display: block;
    margin-bottom: .5rem;
}
.upload-text { font-weight: 600; color: #555; }
.upload-hint { font-size: .85rem; color: #888; }
.upload-formats { font-size: .75rem; color: #aaa; margin-top: .35rem; }

.upload-preview {
    position: relative;
    width: 100%;
}
.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: .5rem;
    object-fit: contain;
}
.upload-remove {
    position: absolute;
    top: .25rem;
    right: .25rem;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* ---------- PRO ---------- */
.bg-gradient-pro {
    background: linear-gradient(135deg, #4361ee 0%, #7c3aed 100%) !important;
    color: #fff;
}
.pro-accordion-btn {
    background: #f4f4ff !important;
    border: 1px solid #e0e0ff;
    border-radius: .5rem !important;
    font-weight: 600;
    color: #333;
}
.pro-accordion-btn:not(.collapsed) {
    background: #eef1ff !important;
}
.pro-field-wrap.disabled {
    opacity: .5;
    pointer-events: none;
}
.pro-lock-icon {
    color: #f59e0b;
    font-size: .75rem;
    margin-left: .25rem;
}
.pro-label {
    font-size: .85rem;
}

/* ---------- Result ---------- */
.result-image-container {
    text-align: center;
}
.result-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: .75rem;
    box-shadow: var(--gen-shadow);
}

/* ---------- History ---------- */
#history-grid .history-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: .5rem;
    cursor: pointer;
    transition: transform .15s;
}
#history-grid .history-item img:hover {
    transform: scale(1.03);
}
#history-grid .history-date {
    font-size: .75rem;
    color: #888;
    margin-top: .35rem;
}

/* ---------- Buttons ---------- */
#btn-generate {
    background: var(--gen-primary);
    border-color: var(--gen-primary);
}
#btn-generate:hover:not(:disabled) {
    background: var(--gen-primary-dark);
    border-color: var(--gen-primary-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 576px) {
    .upload-zone { min-height: 120px; padding: 1rem .75rem; }
    .upload-icon { font-size: 1.5rem; }
    .result-image { max-height: 350px; }
}
