/* ═══════════════════════════════════════════════════════════════════════════
   ProdFoto — Design System «Цифровой сад»
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* Define base colors as comma-separated RGB for opacity support */
    --bg-rgb: 250, 252, 251;
    /* #fafcfb */
    --surface-rgb: 255, 255, 255;
    /* #ffffff */
    --border-rgb: 232, 238, 235;
    /* #e8eeeb */
    --text-primary-rgb: 31, 41, 55;
    /* #1f2937 */
    --text-muted-rgb: 107, 114, 128;
    /* #6b7280 */
    --accent-rgb: 16, 161, 115;
    /* #10a173 */
    --accent-hover-rgb: 13, 133, 95;
    /* #0d855f */

    --bg: rgb(var(--bg-rgb));
    --surface: rgb(var(--surface-rgb));
    --border: rgb(var(--border-rgb));
    --text-primary: rgb(var(--text-primary-rgb));
    --text-muted: rgb(var(--text-muted-rgb));
    --text-light: #9ca3af;
    --accent: rgb(var(--accent-rgb));
    --accent-hover: rgb(var(--accent-hover-rgb));

    --success: #10b981;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Smoother transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ── Reset & Global ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 64px;
    /* Space for fixed navbar */
    position: relative;
    overflow-x: hidden;
}

/* Background animated blobs for a modern "impressive" look */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.4;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 161, 115, 0.3) 0%, rgba(16, 161, 115, 0) 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0) 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h2 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.text-sm {
    font-size: 13px;
    color: var(--text-muted);
}

.text-muted {
    color: var(--text-muted);
}

.text-light {
    color: var(--text-light);
}

.text-accent {
    color: var(--accent);
}

.text-danger {
    color: var(--danger);
}

.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-lg {
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-sm {
    padding: 48px 0;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.gap-4 {
    gap: 32px;
}

.grid {
    display: grid;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.w-full {
    width: 100%;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.p-2 {
    padding: 16px;
}

.p-3 {
    padding: 24px;
}

.p-4 {
    padding: 32px;
}

.hidden {
    display: none;
}

.relative {
    position: relative;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color var(--transition), box-shadow var(--transition);
    font-family: inherit;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
    color: #ffffff;
}

.btn-secondary {
    background-color: rgba(var(--text-primary-rgb), 0.05);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(var(--text-primary-rgb), 0.08);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-light);
}

.btn-dark {
    background-color: var(--text-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-dark:hover {
    background-color: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: var(--danger-hover);
    color: #fff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
    background: rgba(var(--surface-rgb), 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--border-rgb), 0.8);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.card-body {
    padding: 24px;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 122, 74, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 4px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    background: var(--accent-light);
    color: var(--accent);
}

.badge-dark {
    background: var(--text-primary);
    color: #fff;
}

.badge-warning {
    background: #FFF3E0;
    color: #E65100;
}

.badge-danger {
    background: #FFEBEE;
    color: var(--danger);
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
    height: 64px;
    background: rgba(var(--surface-rgb), 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(var(--border-rgb), 0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background-color var(--transition);
}

.navbar-inner {
    padding-left: 30px;
    padding-right: 30px;
    margin: 10px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.navbar-brand:hover {
    color: var(--text-primary);
}

.navbar-brand span {
    color: var(--accent);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.navbar-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}

.navbar-nav a:hover {
    color: var(--text-primary);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-credits {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.navbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ── Mobile nav toggle ──────────────────────────────────────────────────── */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle svg {
    width: 24px;
    height: 24px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-brand span {
    color: var(--accent);
}

.footer-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-heading {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
/* ── File Upload / Interactive ─────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed rgba(var(--border-rgb), 1);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(var(--surface-rgb), 0.5);
    transition: all var(--transition);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
    transform: scale(1.02);
}

.hover-accent:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    transform: translateX(4px);
}

/* ── Modals ────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.25s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition);
    color: var(--text-muted);
}

.modal-close:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 24px;
}

/* ── Ticker / Marquee ────────────────────────────────────────────────────── */
.ticker-wrap {
    overflow: hidden;
    background: var(--text-primary);
    padding: 10px 0;
}

.ticker {
    display: flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    flex-shrink: 0;
    padding: 0 32px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ── Upload Zone ─────────────────────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: #FAFAFA;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
}

/* ── Step indicator ──────────────────────────────────────────────────────── */
.step-num {
    font-size: 14px;
    font-weight: 700;
    font-style: italic;
    color: var(--text-light);
}

/* ── Pricing card ────────────────────────────────────────────────────────── */
.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    position: relative;
    transition: all var(--transition);
}

.pricing-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.pricing-card.highlighted {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), var(--shadow-md);
}

.pricing-name {
    font-size: 24px;
    font-weight: 700;
    font-style: italic;
}

.pricing-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.pricing-price {
    font-size: 36px;
    font-weight: 700;
    margin: 16px 0 8px;
}

.pricing-price .currency {
    font-size: 24px;
}

.pricing-credits {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

.pricing-features {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 8px;
}

.pricing-feature .check {
    color: var(--accent);
    font-weight: 700;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    right: 16px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-lg);
}

/* ── FAQ Accordion ───────────────────────────────────────────────────────── */
.faq-item {
    background: var(--text-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
}

.faq-question svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition);
    flex-shrink: 0;
}

.faq-question[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
}

.faq-answer.open {
    max-height: 300px;
    padding: 0 20px 16px;
}

/* ── Comparison Table ────────────────────────────────────────────────────── */
.comparison-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.comparison-col {
    padding: 32px;
}

.comparison-col.old {
    background: #f5f5f5;
}

.comparison-col.new {
    background: var(--accent-light);
}

/* ── Dashboard cards ─────────────────────────────────────────────────────── */
.stat-card {
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.stat-card-green {
    background: linear-gradient(135deg, #1A7A4A, #22A060);
    color: #fff;
}

.stat-card-dark {
    background: var(--text-primary);
    color: #fff;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    margin-top: 4px;
    opacity: 0.85;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.quick-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.quick-link svg {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

/* ── Generate page ───────────────────────────────────────────────────────── */
.gen-panel {
    background: var(--surface);
    border-right: 1px solid var(--border);
    min-height: calc(100vh - 64px);
    padding: 24px;
}

.gen-panel:last-child {
    border-right: none;
}

.gen-layout {
    display: grid;
    grid-template-columns: 30% 40% 30%;
    min-height: calc(100vh - 64px);
}

.gen-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.gen-section-title h3 {
    font-size: 16px;
    font-weight: 600;
}

.type-tabs {
    display: flex;
    gap: 4px;
    background: #f4f4f4;
    border-radius: var(--radius-sm);
    padding: 4px;
}

.type-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    color: var(--text-muted);
}

.type-tab.active {
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.concept-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 8px;
}

.concept-option:hover {
    border-color: var(--accent);
}

.concept-option.active {
    border-color: var(--accent);
    background: var(--accent-light);
}

.concept-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #eee;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.concept-name {
    font-size: 14px;
    font-weight: 500;
}

.concept-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Photo previews ──────────────────────────────────────────────────────── */
.photo-previews {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.photo-preview {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Results area ────────────────────────────────────────────────────────── */
.results-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--text-light);
    font-size: 15px;
}

.result-grid {
    -webkit-column-count: 2;
    column-count: 2;
    -webkit-column-gap: 12px;
    column-gap: 12px;
}

.result-media-wrap {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg);
    min-height: 80px;
    line-height: 0;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 12px;
    display: inline-block;
    width: 100%;
}

.result-media-wrap img,
.result-media-wrap video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

/* Loading skeleton */
.result-skeleton {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--bg) 25%, #e8e8e8 50%, var(--bg) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s infinite;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Eye hover overlay */
.result-hover-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, opacity 0.2s ease;
    border-radius: var(--radius-md);
    opacity: 0;
    pointer-events: none;
}

.result-media-wrap:hover .result-hover-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.28);
}

.result-eye-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transform: scale(0.85);
    transition: transform 0.18s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.result-media-wrap:hover .result-eye-icon {
    transform: scale(1);
}

/* Legacy (used in project_detail video wraps) */
.result-video-wrap {
    position: relative;
    background: #0a0a0a;
    line-height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.result-video {
    width: 100%;
    height: auto;
    display: block;
}

.result-actions {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Alerts / Messages ───────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-success {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #ffebee;
    color: var(--danger);
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #e3f2fd;
    color: #1565C0;
    border: 1px solid #bbdefb;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .gen-layout {
        grid-template-columns: 1fr;
    }

    .gen-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
        min-height: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 48px 0;
    }

    .navbar-nav {
        display: none;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 12px;
        box-shadow: var(--shadow-md);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 22px;
    }

    .pricing-card {
        padding: 20px;
    }

    .comparison-table {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .btn-lg {
        padding: 14px 24px;
        font-size: 15px;
    }

    .stat-number {
        font-size: 32px;
    }
}

/* ── Result action modal ─────────────────────────────────────────────────── */
.result-modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInOverlay 0.18s ease;
}

.result-modal {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    display: grid;
    grid-template-columns: 1fr 280px;
    width: 900px;
    max-width: 96vw;
    max-height: 92vh;
    overflow: hidden;
    animation: slideUpModal 0.22s ease;
}

.result-modal-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    overflow: hidden;
    line-height: 0;
    min-height: 0;
}

.result-modal-preview img {
    width: 100%;
    height: 100%;
    display: block;
    max-height: 92vh;
    object-fit: contain;
}

.result-modal-preview video {
    width: 100%;
    height: 100%;
    display: block;
    max-height: 92vh;
    background: #0a0a0a;
    object-fit: contain;
}

.result-modal-body {
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid var(--border);
}

.result-modal-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.result-modal-meta {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.result-modal-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.4;
}

.result-modal-meta-label {
    color: var(--text-muted);
    flex-shrink: 0;
}

.result-modal-meta-value {
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
    max-width: 65%;
}

.result-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-modal-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    font-family: inherit;
    width: 100%;
    text-align: left;
}

.result-modal-action-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.result-modal-action-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.result-modal-action-btn.primary:hover {
    background: rgb(var(--accent-hover-rgb));
    border-color: rgb(var(--accent-hover-rgb));
    color: #fff;
}

.result-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    z-index: 1;
}

.result-modal-close:hover {
    background: rgba(0,0,0,0.8);
}

/* ── AI idea chips ───────────────────────────────────────────────────────── */
.ai-ideas-container {
    margin-top: 10px;
}

.ai-ideas-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.ai-ideas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ai-idea-chip {
    padding: 5px 11px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: var(--bg);
    color: var(--text-muted);
    font-family: inherit;
    line-height: 1.4;
    animation: chipAppear 0.2s ease both;
}

.ai-idea-chip:nth-child(1) { animation-delay: 0.02s; }
.ai-idea-chip:nth-child(2) { animation-delay: 0.06s; }
.ai-idea-chip:nth-child(3) { animation-delay: 0.10s; }
.ai-idea-chip:nth-child(4) { animation-delay: 0.14s; }
.ai-idea-chip:nth-child(5) { animation-delay: 0.18s; }

.ai-idea-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.ai-idea-chip.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUpModal {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@keyframes chipAppear {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* gen-layout responsive override */
@media (max-width: 1300px) {
    .gen-layout {
        grid-template-columns: 30% 40% 30%;
    }
}

@media (max-width: 1200px) {
    .gen-layout {
        grid-template-columns: 30% 40% 30%;
    }
}

@media (max-width: 600px) {
    .result-grid {
        -webkit-column-count: 1;
        column-count: 1;
    }
}