* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Overpass';
    /* background-color: #f5f5f5; */
    background-color: transparent; /* Match parent Shopify page background */
    color: #1a1a1a;
    line-height: 1.6;
}

/* To prevent accidental scrolling */
html, body {
    margin: 0;
    padding: 0;
    /* height: 100%; */
    /* Removed for iframe: locking height to 100vh prevents scrollHeight
       from reflecting true content height, breaking the postMessage
       resize bridge in main.js */
    overflow-x: hidden; /* For iframe */
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: white;
    border-bottom: 1px solid #e5e5e5;
}

.logo {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.help-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

    .help-link:hover {
        color: #1a1a1a;
    }

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    /* background: white; */
    /* Removed for iframe integration: white background creates a visible
       box edge against the parent Shopify page */
    /* border-radius: 20px; */
    /* Removed for iframe integration: rounded corners create visible
       card edges when embedded in the parent page */
    /* box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); */
    /* Removed for iframe integration: drop shadow creates a visible
       floating card effect against the parent Shopify page */
    /*overflow: scroll;*/
    overflow: visible;
}

.main-content {
    display: flex;
    gap: 40px;
}

/* Left Panel */
.left-panel {
    flex: 0 0 400px;
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.panel-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.panel-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    display: block;
    color: #1a1a1a;
}

.text-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    font-family: inherit;
    min-height: 120px;
    resize: vertical;
}

    .text-input:focus {
        outline: none;
        border-color: #3b82f6;
    }

/* Steps selector styling */
.steps-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s;
}

    .steps-select:hover {
        border-color: #667eea;
    }

    .steps-select:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .steps-select option {
        padding: 10px;
    }

/* Tag Buttons */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tag-btn {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    background-color: white;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

    .tag-btn:hover {
        border-color: #1a1a1a;
        background-color: #f9f9f9;
    }

    .tag-btn.active {
        background-color: #1a1a1a;
        color: white;
        border-color: #1a1a1a;
    }

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 14px;
    background-color: #1a2332;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .generate-btn:hover {
        background-color: #0f1825;
    }

.note-text {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    text-align: center;
}

/* Right Panel - Results */
.right-panel {
    flex: 1;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-title {
    font-size: 24px;
    font-weight: 600;
}

.new-set-btn {
    padding: 10px 20px;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

    .new-set-btn:hover {
        border-color: #1a1a1a;
        background-color: #f9f9f9;
    }

/* Progress Bar */
.progress-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default */
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-status {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1em;
}

.progress-percentage {
    font-weight: 700;
    color: #667eea;
    font-size: 1.3em;
}

.progress-bar-bg {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    position: relative;
}

.progress-message {
    margin-top: 12px;
    color: #666;
    font-size: 0.95em;
    text-align: center;
    font-style: italic;
}

/* Animated gradient for active progress */
@keyframes progress-animation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.progress-bar-fill.active {
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 200%;
    animation: progress-animation 2s ease infinite;
}

/* Complete state - green gradient */
.progress-bar-fill.complete {
    background: linear-gradient(90deg, #28a745, #218838) !important;
    animation: none !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

/* Error state - red gradient */
.progress-bar-fill.error {
    background: linear-gradient(90deg, #dc3545, #c82333) !important;
    animation: none !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.result-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

    .result-card:hover {
        transform: translateY(-4px);
    }

.result-image {
    width: 100%;
    /* height: 350px; */
    height: auto;
    max-height: 350px;
    object-fit: cover;
}

.option-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #999;
}

.loading-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.empty-text {
    font-size: 16px;
}

/* Detail Page */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 30px;
    transition: color 0.2s;
}

    .back-link:hover {
        color: #1a1a1a;
    }

.detail-title {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
}

.detail-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.detail-image-container {
    flex: 1;
}

.detail-image {
    width: 100%;
    border-radius: 12px;
}

.detail-info {
    flex: 0 0 350px;
}

.info-item {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.info-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.info-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-content p {
    font-size: 14px;
    color: #666;
}

.action-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.primary-btn {
    background-color: #1a2332;
    color: white;
}

    .primary-btn:hover {
        background-color: #0f1825;
    }

.secondary-btn {
    background-color: white;
    color: #1a1a1a;
    border: 1px solid #d1d5db;
}

    .secondary-btn:hover {
        background-color: #f9f9f9;
    }

/* Loading/Order Page */
.centered-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 40px;
}

.status-icon {
    width: 80px;
    height: 80px;
    border: 4px solid #1a2332;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.checkmark {
    width: 40px;
    height: 40px;
    stroke: #1a2332;
    stroke-width: 3;
    fill: none;
}

.status-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
}

.status-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
}

.status-list {
    list-style: none;
    text-align: left;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    margin-bottom: 16px;
}

.status-item-icon {
    width: 24px;
    height: 24px;
    background-color: #1a2332;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .status-item-icon svg {
        width: 14px;
        height: 14px;
        stroke: white;
        fill: none;
        stroke-width: 2;
    }

/* Code Entry Page */
.code-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.lock-icon {
    margin-bottom: 20px;
}

.page-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.code-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
}

.code-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
}

.code-input {
    width: 100%;
    padding: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    margin-bottom: 20px;
    font-family: 'Overpass';
}

    .code-input:focus {
        outline: none;
        border-color: #3b82f6;
    }

.submit-btn {
    width: 100%;
    padding: 16px;
    background-color: #1a2332;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 20px;
}

    .submit-btn:hover {
        background-color: #0f1825;
    }

.link-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

    .text-link:hover {
        color: #1a1a1a;
    }

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .left-panel {
        flex: 1;
        max-width: 100%;
    }

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

    .detail-content {
        flex-direction: column;
    }

    .detail-info {
        flex: 1;
        max-width: 100%;
    }
}


/* Top nav and footer Start*/


/* body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            line-height: 1.6;
            color: #333;
        } */

/* Top Announcement Bar */
.announcement-bar {
    background-color: #333333;
    color: white;
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Header Navigation */
/* Header Navigation */
.header-new {
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}

.header-top-left a,
.header-top-right a {
    color: #666;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s;
}

    .header-top-left a:hover,
    .header-top-right a:hover {
        color: #2c3e50;
    }

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding: 20px 40px; */
    position: relative;
    padding-left: 20px;
    padding-right: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    z-index: 1001;
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

    .nav-menu a {
        color: #333;
        text-decoration: none;
        font-weight: 500;
        font-size: 15px;
        transition: color 0.3s;
        position: relative;
    }

        .nav-menu a:hover {
            color: #2c3e50;
        }

        .nav-menu a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -5px;
            left: 0;
            background-color: #2c3e50;
            transition: width 0.3s;
        }

        .nav-menu a:hover::after {
            width: 100%;
        }

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

    .header-actions a {
        color: #333;
        text-decoration: none;
        font-size: 14px;
        transition: color 0.3s;
    }

        .header-actions a:hover {
            color: #2c3e50;
        }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background-color: #2c3e50;
        transition: all 0.3s;
        border-radius: 2px;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1000;
    padding: 80px 20px 20px;
}

    .mobile-nav.active {
        left: 0;
    }

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 20%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .mobile-overlay.active {
        opacity: 1;
    }

.mobile-nav-menu {
    list-style: none;
}

    .mobile-nav-menu li {
        border-bottom: 1px solid #e0e0e0;
    }

    .mobile-nav-menu a {
        display: block;
        padding: 15px 0;
        color: #333;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        transition: color 0.3s;
    }

        .mobile-nav-menu a:hover {
            color: #2c3e50;
        }

.mobile-nav-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

    .mobile-nav-actions a {
        display: block;
        padding: 12px 0;
        color: #666;
        text-decoration: none;
        font-size: 14px;
    }

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.main-content {
    display: flex;
    gap: 40px;
}

/* Left Panel */
.left-panel {
    flex: 0 0 400px;
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.panel-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.panel-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    display: block;
    color: #1a1a1a;
}

.text-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    font-family: inherit;
    min-height: 120px;
    resize: vertical;
}

    .text-input:focus {
        outline: none;
        border-color: #3b82f6;
    }

/* Tag Buttons */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tag-btn {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    background-color: white;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

    .tag-btn:hover {
        border-color: #1a1a1a;
        background-color: #f9f9f9;
    }

    .tag-btn.active {
        background-color: #1a1a1a;
        color: white;
        border-color: #1a1a1a;
    }

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 14px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .generate-btn:hover {
        background-color: #1a252f;
    }

.note-text {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    text-align: center;
}

/* Right Panel - Results */
.right-panel {
    flex: 1;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-title {
    font-size: 24px;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #999;
}

.loading-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.empty-text {
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .left-panel {
        flex: 1;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .announcement-bar {
        font-size: 12px;
        padding: 8px 15px;
    }

    .header-top {
        padding: 8px 20px;
        font-size: 12px;
    }

    .header-top-left,
    .header-top-right {
        display: none;
    }

    .header-main {
        padding: 15px 20px;
    }

    .logo {
        font-size: 20px;
    }

    /* Hide desktop nav on mobile */
    nav,
    .header-actions {
        display: none;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Show mobile nav */
    .mobile-nav,
    .mobile-overlay {
        display: block;
    }

    .container {
        padding: 20px 15px;
    }

    .left-panel {
        padding: 20px;
    }

    .panel-title {
        font-size: 20px;
    }

    .modal-content {
        min-width: 500px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }

    .tag-container {
        gap: 8px;
    }

    .tag-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .modal-content {
        min-width: 350px;
    }
}

/* Footer */
.footer {
    background-color: #1C2C3B;
    color: white;
    padding: 60px 40px 30px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-section ul {
    list-style: none;
}

    .footer-section ul li {
        margin-bottom: 12px;
    }

        .footer-section ul li a {
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            font-size: 14px;
            transition: color 0.3s;
        }

            .footer-section ul li a:hover {
                color: white;
            }

.footer-contact p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

    .footer-social a {
        width: 35px;
        height: 35px;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        text-decoration: none;
        transition: background-color 0.3s;
    }

        .footer-social a:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

    .footer-bottom p {
        color: rgba(255, 255, 255, 0.6);
        font-size: 14px;
    }

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.payment-icon {
    width: 45px;
    height: 30px;
    background-color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header-main {
        /* flex-direction: column; */
        gap: 20px;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .main-content {
        flex-direction: column;
    }

    .left-panel {
        max-width: 100%;
    }

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

/* Top nav and footer End*/

/* Pattern Diffusion Start */

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    /*overflow: scroll;*/
    overflow: visible;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

    .header h1 {
        font-size: 2.5em;
        margin-bottom: 10px;
    }

    .header p {
        font-size: 1.1em;
        opacity: 0.9;
    }

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    /* padding: 40px; */
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .form-group label {
        font-weight: 600;
        color: #333;
        font-size: 0.95em;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 1em;
        transition: all 0.3s;
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

    .form-group textarea {
        resize: vertical;
        min-height: 120px;
        font-family: inherit;
    }

.size-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

    .slider-value span {
        font-weight: 600;
        color: #667eea;
        font-size: 1.1em;
    }

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #667eea;
        cursor: pointer;
    }

    input[type="range"]::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #667eea;
        cursor: pointer;
        border: none;
    }

.generate-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

    .generate-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    }

    .generate-btn:active {
        transform: translateY(0);
    }

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

.output-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-container {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .image-container img {
        max-width: 100%;
        max-height: 600px;
        border-radius: 8px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }

.placeholder {
    text-align: center;
    color: #999;
}

    .placeholder svg {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
        opacity: 0.3;
    }

.loading {
    display: none;
    text-align: center;
    color: #667eea;
}

    .loading.active {
        display: block;
    }

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.examples {
    /* padding: 0 40px 40px; */
}

    .examples h2 {
        margin-bottom: 20px;
        color: #333;
    }

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.example-card {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

    .example-card:hover {
        background: #fff;
        border-color: #667eea;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .example-card .example-prompt {
        font-size: 0.9em;
        color: #555;
        margin-bottom: 8px;
        line-height: 1.4;
    }

    .example-card .example-params {
        font-size: 0.8em;
        color: #999;
    }

.error-message {
    display: none;
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

    .error-message.active {
        display: block;
    }

.download-btn {
    padding: 12px 24px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
}

    .download-btn.active {
        display: inline-block;
    }

    .download-btn:hover {
        background: #218838;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
    }

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}
/* Pattern Diffusion Ends */

/* RAG Page Starts*/

/* Header */
/* .header {
            background: linear-gradient(135deg, #2E86AB, #A23B72);
            color: white;
            padding: 20px 30px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }

        .header h1 {
            font-size: 1.8em;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .controls {
            display: flex;
            gap: 15px;
            align-items: center;
            flex-wrap: wrap;
        } */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-clear {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

    .btn-clear:hover {
        background: rgba(255, 255, 255, 0.3);
    }

/* Chat Area */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--background);
}

.message {
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.message-content {
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 12px;
    line-height: 1.6;
    position: relative;
}

.message.user {
    display: flex;
    justify-content: flex-end;
}

    .message.user .message-content {
        background: var(--user-msg);
        color: var(--text-dark);
        border-bottom-right-radius: 4px;
    }

.message.assistant {
    display: flex;
    justify-content: flex-start;
}

    .message.assistant .message-content {
        background: var(--assistant-msg);
        color: var(--text-dark);
        border-bottom-left-radius: 4px;
    }

.message-role {
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 5px;
    font-weight: 600;
}

/* Images Display */
.product-images {
    display: grid;
    gap: 10px;
    margin: 15px 0;
    max-width: 600px;
}

    .product-images.count-1 {
        grid-template-columns: 1fr;
    }

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

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

    .product-images img {
        width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s;
        pointer-events: none; /* Blocks mouse interactions (right-click, etc.) */
        user-select: none; /* Prevents selection */
        -webkit-user-select: none; /* Safari */
        -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* IE/Edge */
        -webkit-user-drag: none; /* Prevents drag on Safari/Chrome */
        -webkit-touch-callout: none; /* Disables iOS long-press menu */
        cursor: not-allowed; /* Shows "not allowed" cursor */
    }

        .product-images img:hover {
            transform: scale(1.05);
        }

/* Clickable URL Styling */
.product-url,
.message-text a {
    color: #2E86AB !important;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid #2E86AB;
    transition: all 0.3s ease;
    padding: 1px 2px;
}

    .product-url:hover,
    .message-text a:hover {
        color: #1a5a7a !important;
        border-bottom-color: #1a5a7a;
        background-color: #e3f2fd;
        padding: 2px 4px;
        border-radius: 3px;
    }

.info-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    color: #856404;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

    .loading.active {
        display: block;
    }

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Input Area */
.input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.input-field {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    min-height: 50px;
    max-height: 150px;
    transition: border-color 0.3s;
}

    .input-field:focus {
        outline: none;
        border-color: var(--primary-color);
    }

.btn-send {
    padding: 15px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    /* color: white; */
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s;
    min-width: 100px;
}

    .btn-send:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(46, 134, 171, 0.4);
    }

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

/* Status Messages */
.status-message {
    display: none;
    padding: 15px;
    margin: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
}

    .status-message.error {
        background: #fee;
        color: #c33;
        border-left: 4px solid #c33;
        display: block;
    }

    .status-message.info {
        background: #e3f2fd;
        color: #1976d2;
        border-left: 4px solid #1976d2;
        display: block;
    }

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    padding: 40px;
    text-align: center;
}

    .empty-state i {
        font-size: 4em;
        margin-bottom: 20px;
        opacity: 0.3;
    }

    .empty-state h2 {
        font-size: 1.5em;
        margin-bottom: 10px;
        color: var(--text-dark);
    }

    .empty-state p {
        font-size: 1em;
        max-width: 500px;
    }

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.3em;
    }

    .controls {
        width: 100%;
    }

    .message-content {
        max-width: 90%;
    }

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

/* Markdown-like styling */
.message-text h1, .message-text h2, .message-text h3 {
    margin: 15px 0 10px;
    color: var(--text-dark);
}

.message-text p {
    margin: 10px 0;
}

.message-text ul, .message-text ol {
    margin: 10px 0;
    padding-left: 25px;
}

.message-text li {
    margin: 5px 0;
}

.message-text strong {
    font-weight: 700;
    color: var(--primary-color);
}

.message-text code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Overpass';
}

/* RAG Page Ends */
