/* ============================================
   TEXT TO IMAGE PAGE STYLES — TOOL SPECIFIC
   ============================================ */

.text-image-page {
    background: #020408;
}

/* Hero & Title Animations */
.text-image-page .hero {
    text-align: center;
}

.text-image-page .hero-title {
    animation: fadeInUp 0.8s ease 0.1s both;
}

.text-image-page .hero-subtitle {
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Studio UI */
.text-image-page .studio-container {
    background: rgba(18, 22, 33, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.studio-panel {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    min-height: 520px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s ease;
}

.panel-header {
    padding: 24px 24px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.panel-body {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 92, 252, 0.3) transparent;
}

.panel-body::-webkit-scrollbar {
    width: 6px;
}

.panel-body::-webkit-scrollbar-thumb {
    background: rgba(124, 92, 252, 0.3);
    border-radius: 10px;
}

.panel-footer {
    padding: 20px 24px 24px;
    background: rgba(10, 12, 18, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.panel-footer.result-footer {
    padding: 18px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-studio {
    margin-top: 0 !important;
    height: 54px;
    font-size: 1.05rem;
    box-shadow: 0 4px 15px rgba(124, 92, 252, 0.2);
}

.btn-studio:not(:disabled):hover {
    box-shadow: 0 0 25px rgba(124, 92, 252, 0.4);
    transform: translateY(-2px);
}

.result-meta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.platform-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.03);
}

.input-container {
    position: relative;
    flex-shrink: 0;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
}

.prompt-textarea {
    flex: 1;
    min-height: 160px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.6;
    resize: none;
    transition: all 0.3s ease;
}

.prompt-textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 24px rgba(124, 92, 252, 0.15);
}

.char-counter {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 10px;
}

.suggestion-chips {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.chip:hover {
    background: rgba(124, 92, 252, 0.15);
    color: #fff;
    border-color: var(--accent-1);
    transform: translateY(-2px);
}

/* Result Design */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--text-muted);
    opacity: 0.2;
}

.image-preview-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 18px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.image-preview-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.image-preview-wrapper img:hover {
    transform: scale(1.02);
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.btn-result-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-result-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-2);
    transform: translateY(-2px);
    color: #fff;
}

.btn-result-action i {
    font-size: 1rem;
    color: var(--accent-2);
}

/* Features Cards */
.feature-card {
    padding: 40px 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 28px;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-1);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feature-card i {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    display: block;
}

.feature-card h4 {
    margin-bottom: 14px;
    font-weight: 700;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* Loader Styles */
.btn-loader {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

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

/* Scan Line Animation */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, transparent, var(--accent-1), transparent);
    z-index: 10;
    opacity: 0.8;
    box-shadow: 0 0 15px var(--accent-1);
    animation: scanMove 3s linear infinite;
}

@keyframes scanMove {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

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

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

@media (max-width: 992px) {
    .studio-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   BEFORE / AFTER EXAMPLES SECTION
   ============================================ */

.ba-examples-grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin-top: 60px;
}

/* BA Card */
.ba-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.ba-card:hover {
    border-color: rgba(124, 92, 252, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(124, 92, 252, 0.06);
    transform: translateY(-4px);
}

/* Category Badge Row */
.ba-label-row {
    padding: 20px 28px 0;
}

.ba-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
}

/* Layout: Before | Arrow | After */
.ba-layout {
    display: grid;
    grid-template-columns: 1fr 80px 1.4fr;
    gap: 0;
    padding: 20px 28px 0;
    align-items: stretch;
}

/* Panels */
.ba-panel {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ba-before {
    border-color: rgba(124, 92, 252, 0.15);
}

.ba-after {
    border-color: rgba(0, 212, 255, 0.15);
}

.ba-panel-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.15);
    flex-wrap: wrap;
}

.ba-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: 50px;
}

.ba-pill-before {
    background: rgba(124, 92, 252, 0.18);
    color: #a78bfa;
    border: 1px solid rgba(124, 92, 252, 0.3);
}

.ba-pill-after {
    background: rgba(0, 212, 255, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.ba-meta-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ba-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Panel Body */
.ba-panel-body {
    padding: 20px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ba-image-body {
    padding: 14px;
}

/* Prompt Box (Before) */
.ba-prompt-box {
    background: rgba(10, 10, 20, 0.5);
    border-radius: 14px;
    padding: 20px 22px;
    border: 1px solid rgba(124, 92, 252, 0.1);
    margin-bottom: 16px;
    position: relative;
}

.ba-prompt-box p {
    font-size: 1.1rem;
    font-weight: 500;
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.ba-quote {
    display: block;
    font-size: 3rem;
    line-height: 0.5;
    color: rgba(124, 92, 252, 0.35);
    font-family: Georgia, serif;
    margin-bottom: 8px;
}

.ba-quote.closing {
    text-align: right;
    margin-top: 8px;
    margin-bottom: 0;
}

.ba-prompt-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Image Area (After) */
.ba-image-wrapper {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ba-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ba-image:hover {
    transform: scale(1.03);
}

.ba-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ba-image-wrapper:hover .ba-image-overlay {
    opacity: 1;
}

.ba-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ba-view-btn:hover {
    background: rgba(124, 92, 252, 0.4);
    border-color: #7c5cfc;
    color: #fff;
    transform: scale(1.05);
}

/* Divider Arrow  */
.ba-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ba-arrow-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ba-arrow-circle i {
    font-size: 2.2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseArrow 2s ease-in-out infinite;
}

.ba-arrow-circle span {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@keyframes pulseArrow {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.18) translateX(4px);
        opacity: 0.8;
    }
}

/* Footer: Enhanced Prompt + Copy */
.ba-footer {
    padding: 20px 28px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.ba-full-prompt {
    flex: 1;
    min-width: 200px;
}

.ba-full-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a78bfa;
    margin-bottom: 10px;
}

.ba-full-label i {
    font-size: 0.85rem;
}

.ba-full-prompt p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.ba-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: rgba(124, 92, 252, 0.12);
    border: 1px solid rgba(124, 92, 252, 0.3);
    border-radius: 12px;
    color: #a78bfa;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
}

.ba-copy-btn:hover {
    background: rgba(124, 92, 252, 0.25);
    border-color: #7c5cfc;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 92, 252, 0.2);
}

.ba-copy-btn.copied {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.4);
    color: #00ff88;
}

/* Responsive */
@media (max-width: 900px) {
    .ba-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .ba-divider {
        padding: 10px 0;
        transform: rotate(90deg);
    }

    .ba-image {
        height: 220px;
    }

    .ba-footer {
        flex-direction: column;
        gap: 14px;
    }

    .ba-copy-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .ba-layout {
        padding: 14px 14px 0;
    }

    .ba-label-row,
    .ba-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ba-image {
        height: 190px;
    }
}