/* Product Design Analysis Styles */

/* Live Preview Styles */
.preview-container {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
    background: #fff;
}

.preview-frame {
    width: 100%;
    height: 400px;
    border: none;
    background: #fff;
}

.live-preview-section {
    margin: 1.5rem 0;
}

.live-preview-section h4 {
    margin-bottom: 1rem;
    color: #374151;
    font-weight: 600;
}

/* Implementation Guide Styles */
.implementation-guide {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.guide-content {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.guide-section {
    background: #fff;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.guide-section h5 {
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 600;
}

.guide-text {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* ASCII Preview Styles */
.wireframe-screen {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #ffffff;
}

.wireframe-header h4 {
    margin: 0;
    color: #111827;
    font-size: 1.125rem;
    font-weight: 600;
}

.wireframe-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.action-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.preview-btn {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.preview-btn:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.ascii-wireframe {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: black;
    padding: 1rem;
    color: green;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* Preview Modal Styles */
.preview-modal-overlay,
.preview-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.preview-modal,
.preview-result-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.preview-result-modal {
    max-width: 95vw;
    width: 95%;
    max-height: 90vh;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-body.full-height {
    height: 100%;
}

.preview-iframe.full-preview {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* Wireframe Inline Preview Styles */
.wireframe-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.mode-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.toggle-btn {
    padding: 8px 16px;
    border: none;
    background: #ffffff;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    /* border-right: 1px solid #d1d5db; */
}

.toggle-btn:last-child {
    border-right: none;
}

.toggle-btn:hover {
    background: #f9fafb;
    color: #374151;
}

.toggle-btn.active {
    background: #3b82f6;
    color: white;
    font-weight: 600;
}

.preview-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    /* padding-left: 12px; */
    /* border-left: 1px solid #e5e7eb; */
    padding-top: 0px;
    margin-top: 0px;
    border-top: 0px;
}

.current-design-indicator {
    padding: 4px 12px;
    background: #e0f2fe;
    border: 1px solid #0891b2;
    border-radius: 4px;
    font-size: 13px;
    color: #0e7490;
    font-weight: 500;
    white-space: nowrap;
    display: none;
}

.action-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

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

.download-btn:hover:not(:disabled) {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.fullscreen-btn:hover:not(:disabled) {
    background: #f0fdf4;
    border-color: #16a34a;
    color: #15803d;
}

.inline-preview {
    min-height: 300px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #9ca3af;
    font-style: italic;
}

.preview-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.usage-steps {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 1rem;
}

.usage-steps ol {
    margin: 0;
    padding-left: 1.25rem;
}

.usage-steps li {
    margin-bottom: 0.5rem;
    color: #0c4a6e;
    font-size: 0.875rem;
    line-height: 1.4;
}

.usage-steps code {
    background: #1e293b;
    color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Code Section Styles */
.code-section {
    margin-bottom: 1.5rem;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.code-header h4 {
    margin: 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal Overlay Styles */
.analysis-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

/* Modal Styles */
.product-design-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.product-design-modal::-webkit-scrollbar {
    display: none;
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0 0 0.5rem 0;
    color: lightgoldenrodyellow;
    font-size: 1.8rem;
    font-weight: 600;
}

.modal-header p {
    color: #666;
    margin: 0;
    font-size: 1rem;
}

.modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-shrink: 0;
}

/* Input Sections */
.input-section {
    margin-bottom: 2rem;
}

.input-section label {
    display: block;
    font-weight: 800;
}

.input-section input{
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ascii-view,
.preview-view {
    transition: opacity 0.2s ease-in-out;
}

/* Design Preferences Section */
.design-preferences-section {
    margin-top: 2rem;
    padding-top: 2rem;
    display: none;
    border-top: 1px solid #e0e0e0;
}

.design-preferences-section h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.preferences-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.preference-item label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.preference-item select {
    font-size: 0.9rem;
    padding: 0.75rem;
}

/* Button Styles */
.cancel-btn,
.analyze-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

.analyze-btn {
    background: #1976d2;
    color: white;
}

.analyze-btn:hover:not(:disabled) {
    background: #1565c0;
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Results Overlay */
.analysis-results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 0rem;
}

.results-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Scrollbar on outer container */
}

.results-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #f8f9fa;
}

.results-header h2 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Tab Navigation */
.results-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: fit-content;
}

.tab-btn:hover {
    background: rgba(25, 118, 210, 0.1);
    color: #1976d2;
}

.tab-btn.active {
    color: #1976d2;
    border-bottom-color: #1976d2;
    background: white;
}

/* Tab Content */
.results-content {
    flex: 1;
    overflow: visible;
    background: #f8f9fa;
    padding: 2rem;
}

.tab-panel {
    display: none;
    padding: 0;
    min-height: calc(100vh - 200px);
    overflow: visible;
}

.tab-panel.active {
    display: block;
    /* width: fit-content; */
}

/* Tab Placeholders */
.tab-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
}

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

.placeholder-content h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.5rem;
}

.placeholder-content p {
    margin: 0 0 2rem 0;
    font-size: 1.1rem;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.3;
}

/* Brief & Selection Tab */
.brief-analysis-panel {
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

/* Selection Section Styles */
.selection-section {
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    padding: 2rem;
    padding-top: 1rem;
}

.modules-section {
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    padding: 2rem;
    padding-top: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.header-content {
    flex: 1;
}

.header-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}
/* 
.header-content .section-description {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: normal;
} */



.selection-counter {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}


.section-description {
    margin: 0 0 1.5rem 0;
    color: #666;
    background-color: white;
    border-radius: 0px;
    /* font-size: 0.9rem; */
    line-height: 1.3;
    font-style: normal;
    padding: 0px;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    border: 0px solid #f8fafc;
    font-weight: 400;
}

/* Themes Grid */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.theme-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.theme-card:hover {
    border-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.15);
}

.theme-card.selected {
    border-color: #1976d2;
    background: #f8f9ff;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.2);
}

.theme-icon {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.theme-content {
    flex: 1;
}

.theme-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.theme-description {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.selection-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.selection-indicator.selected {
    background: #1976d2;
    border-color: #1976d2;
}

.check-icon {
    color: white;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.selection-indicator.selected .check-icon {
    opacity: 1;
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.module-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.module-card:hover {
    border-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.15);
}

.module-card.selected {
    border-color: #1976d2;
    /* background: #f8f9ff; */
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.2);
}

.module-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.module-content {
    flex: 1;
}

.module-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.module-description {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.features-count {
    font-size: 0.8rem;
    color: #1976d2;
    font-weight: 500;
}

/* Features List in Selected Modules */
.features-list {
    margin-top: 1rem;
    /* padding-top: 1rem; */
    /* border-top: 1px solid #e0e0e0; */
    animation: fadeInUp 0.3s ease;
}

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

.features-list h6 {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.feature-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.feature-checkbox-item input[type="checkbox"] {
    margin: 0;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.feature-checkbox-label {
    flex: 1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.feature-name {
    font-size: 0.85rem;
    font-weight: 400;
    color: #333;
}

.feature-desc {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.3;
}

.feature-checkbox-item input[type="checkbox"]:checked + .feature-checkbox-label .feature-name {
    /* color: #1976d2; */
}

/* Prevent module card clicks in feature area */
.features-list {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    /* padding: 1rem; */
    margin-top: 1rem;
    /* border: 1px solid #e0e0e0; */
}

.features-list h6 {
    margin: 0 0 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
}

/* Ensure feature checkboxes don't trigger module selection */
.feature-checkbox-item {
    position: relative;
    z-index: 20;
    pointer-events: auto;
}

.add-custom-feature {
    position: relative;
    z-index: 20;
    pointer-events: auto;
}

/* Make module card click area exclude features */
.module-card.selected .features-list {
    pointer-events: none;
}

.module-card.selected .feature-checkbox-item,
.module-card.selected .add-custom-feature {
    pointer-events: auto;
}

/* Legacy feature tags for other parts */
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.feature-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #bbdefb;
}

.analysis-summary {
    margin-bottom: 3rem;
}

.analysis-summary h3 {
    margin: 0 0 2rem 0;
    color: #1976d2;
    font-size: 1.5rem;
    text-align: center;
}

.analysis-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analysis-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #1976d2;
}

.analysis-card h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.analysis-card p {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
}

/* Themes Selection */
.themes-selection h3 {
    margin: 0 0 1rem 0;
    color: #1976d2;
    font-size: 1.3rem;
}

.themes-selection > p {
    margin: 0 0 2rem 0;
    color: #666;
    font-size: 1rem;
}

.themes-container {
    display: grid;
    gap: 2rem;
}

.theme-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s;
    background: white;
}

.theme-card.selected {
    border-color: #1976d2;
    background: #f8fbff;
}

.theme-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.theme-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.theme-header label {
    flex: 1;
    cursor: pointer;
}

.theme-header h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.theme-header p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.modules-container {
    display: grid;
    gap: 1rem;
    margin-left: 2rem;
}

.module-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
    background: white;
}

.module-item.selected {
    border-color: #1976d2;
    background: #f0f7ff;
}

.module-item label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

.module-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
}

.module-item strong {
    display: block;
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Tab Actions */
.tab-actions {
    /* margin-top: 3rem; */
    text-align: center;
    /* padding-top: 2rem; */
    /* border-top: 1px solid #e0e0e0; */
}

.next-tab-btn,
.back-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 0.5rem;
}

.next-tab-btn {
    background: #1976d2;
    color: white;
}

.next-tab-btn:hover {
    background: #1565c0;
}

.back-btn {
    background: #f5f5f5;
    color: #666;
}

.back-btn:hover {
    background: #e0e0e0;
}

/* IA Tab Styles */
.ia-panel {
    width: 100%;
    margin: 0 auto;
}

.ia-panel h3 {
    margin: 0 0 1rem 0;
    color: #1976d2;
    font-size: 1.5rem;
    text-align: center;
}

.ia-panel > p {
    margin: 0 0 3rem 0;
    color: #666;
    font-size: 1rem;
    text-align: center;
}

.ia-section {
    margin-bottom: 3rem;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
}

.ia-section h4 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.navigation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}

.nav-group h5 {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.nav-item {
    background: white;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: text;
    transition: all 0.2s;
}

.nav-item:hover {
    border-color: #1976d2;
    background: #f0f7ff;
}

.nav-item:focus {
    outline: none;
    border-color: #1976d2;
    background: white;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.add-nav-btn,
.add-flow-btn {
    background: #e3f2fd;
    border: 2px dashed #1976d2;
    color: #1976d2;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    width: 100%;
}

.add-nav-btn:hover,
.add-flow-btn:hover {
    background: #1976d2;
    color: white;
}

/* User Flows */
.flows-container {
    margin-bottom: 1.5rem;
    width: 100%;
}

.flow-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.flow-number {
    background: #1976d2;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.flow-text {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: text;
    transition: all 0.2s;
}

.flow-text:hover {
    /* border-color: #e0e0e0; */
    /* background: #f8f9fa; */
}

.flow-text:focus {
    outline: none;
    border-color: #1976d2;
    background: white;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.remove-flow-btn {
    background: #fee;
    border: 1px solid #f5c6cb;
    color: #721c24;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.remove-flow-btn:hover {
    background: #f8d7da;
}

/* Progress Message Styles */
.analysis-progress-container {
    display: none;
    margin-top: 2rem;
    text-align: center;
}

.analysis-progress-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.progress-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.progress-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.progress-subtext {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Wireframes Tab Styles */
.wireframes-panel {
    max-width: 1200px;
    margin: 0 auto;
}

/* Wireframe Top Section Layout */
.wireframe-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 2rem;
    /* padding: 10px; */
}

.wireframe-left-top {
    flex: 1;
}

.wireframe-left-top h3 {
    margin: 0 0 0.5rem 0;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 600;
}

.wireframe-left-top p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Global Design System Selector */
.global-design-selector {
    flex-shrink: 0;
    /* min-width: 280px; */
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.global-design-selector label {
    display: block;
    font-weight: 600;
    color: #1e40af;
    font-size: 0.875rem;
}

/* Enhanced Design System Dropdown */
.design-system-dropdown {
    position: relative;
}

.dropdown-trigger {
    cursor: pointer;
    user-select: none;
}

.selected-design-system {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s ease;
}

.selected-design-system:hover {
    border-color: #9ca3af;
}

.color-palette-display {
    display: flex;
    align-items: center;
    gap: -2px;
}

.color-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-left: -4px;
}

.color-circle:first-child {
    margin-left: 0;
}

.design-system-name {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.dropdown-arrow {
    margin-left: auto;
    color: #6b7280;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    margin-top: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
}

.design-system-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.design-system-option:last-child {
    border-bottom: none;
}

.design-system-option:hover {
    background-color: #f9fafb;
}

.design-system-option .color-palette-display {
    flex-shrink: 0;
}

.design-system-option .design-system-name {
    flex: 1;
}

.design-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-style: italic;
}

.wireframes-container {
    margin-bottom: 3rem;
}

.wireframe-screen {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wireframe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0rem 0rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    background: none;
}

.wireframe-title h4 {
    margin: 0;
    color: #111827;
    font-size: 1.125rem;
    font-weight: 600;
}

.wireframe-display {
    background: #f8f9fa;
    border: 0px solid #e5e7eb;
    border-radius: 8px;
    /* padding: 1.5rem; */
    overflow-x: auto;
}

.wireframe-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    min-height: 400px;
}

.ascii-view,
.preview-view {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
    opacity: 0.6;
    transform: scale(0.98);
}

.ascii-view.active,
.preview-view.active {
    opacity: 1;
    transform: scale(1);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.view-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.view-header h5 {
    margin: 0;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ascii-container {
    background: #f8f9fa;
    /* border: 1px solid #e5e7eb; */
    border-radius: 6px;
    /* padding: 1rem; */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.wireframe-display pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    color: floralwhite;
    white-space: pre;
}

.flows-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.flows-section h4 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.flows-list .flow-item {
    background: white;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.flows-list .flow-number {
    background: #1976d2;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.flows-list .flow-text {
    flex: 1;
    color: #333;
}

/* Content Hierarchy Styles */
.hierarchy-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-top: 2rem;
}

.hierarchy-section h4 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.hierarchy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.hierarchy-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.hierarchy-item:hover {
    border-color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
    transform: translateY(-1px);
}

.hierarchy-item h5 {
    margin: 0 0 1rem 0;
    color: #1976d2;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hierarchy-item h5::before {
    content: "📂";
    font-size: 1rem;
}

.hierarchy-item ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hierarchy-item li {
    padding: 0.5rem 0;
    color: #555;
    position: relative;
    padding-left: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.2s ease;
}

.hierarchy-item li:last-child {
    border-bottom: none;
}

/* Design System Tab Styles */
.design-system-panel {
    max-width: 1200px;
    margin: 0 auto;
}

.design-systems-container {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.design-system-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.2s;
}

.design-system-card:hover {
    border-color: #1976d2;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.1);
}

.system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.system-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.suitability-score {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.system-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.color-palette {
    margin-bottom: 1.5rem;
}

.color-palette h5 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.color-swatches {
    display: flex;
    gap: 0.5rem;
}

.color-swatch {
    width: 3rem;
    height: 3rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    cursor: help;
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.typography-info,
.style-info {
    margin-bottom: 1.5rem;
}

.typography-info h5,
.style-info h5 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.typography-info p,
.style-info p {
    margin: 0;
    color: #666;
}

.select-system-btn {
    background: #1976d2;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.select-system-btn:hover {
    background: #1565c0;
}

/* Assets Tab Styles */
.assets-panel {
    max-width: 1200px;
    margin: 0 auto;
}

.package-summary {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin-bottom: 3rem;
}

.package-summary h4 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.summary-item strong {
    color: #1976d2;
    display: block;
    margin-bottom: 0.25rem;
}

.downloads-section {
    margin-bottom: 3rem;
}

.downloads-section h4 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.downloads-grid {
    display: grid;
    gap: 1rem;
}

.download-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-info h5 {
    margin: 0 0 0.25rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.download-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.download-btn {
    background: #1976d2;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.download-btn:hover {
    background: #1565c0;
}

.completion-actions {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.new-project-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 0.5rem;
}

.new-project-btn {
    background: #f5f5f5;
    color: #666;
}

.new-project-btn:hover {
    background: #e0e0e0;
}

/* Wireframe Approval Styles */
.wireframe-approval {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    display: none;
}

.wireframe-approval h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.wireframe-approval p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
}

.approval-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.approval-option {
    flex: 1;
}

.approval-option input[type="radio"] {
    display: none;
}

.approval-option label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.approval-option label:hover {
    border-color: #1976d2;
    background: #f8f9ff;
}

.approval-option input[type="radio"]:checked + label {
    border-color: #1976d2;
    background: #e3f2fd;
}

.approval-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.approval-text {
    flex: 1;
}

.approval-text strong {
    display: block;
    color: #333;
    margin-bottom: 0.25rem;
}

.revision-feedback {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.revision-feedback label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.revision-feedback textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 0.75rem;
}

.revise-wireframes-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.revise-wireframes-btn:hover {
    background: #f57c00;
}

.tab-actions .next-tab-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.tab-actions .next-tab-btn:disabled:hover {
    background: #ccc;
}

.tab-actions .next-tab-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.tab-actions .next-tab-btn.disabled:hover {
    background: #ccc;
    transform: none;
}

/* Add Custom Elements */
.add-custom-card {
    border: 2px dashed #1976d2 !important;
    background: #f8f9ff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
}

.add-custom-card:hover {
    background: #e3f2fd !important;
    border-color: #1565c0 !important;
}

.add-custom-icon {
    font-size: 2rem;
    color: #1976d2;
    margin-right: 1rem;
}

.add-custom-content {
    flex: 1;
}

.add-custom-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1976d2;
}

.add-custom-description {
    margin: 0;
    font-size: 0.9rem;
    color: #1976d2;
    opacity: 0.8;
}

/* Add Custom Feature */
.add-custom-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 1px dashed #1976d2;
    border-radius: 6px;
    background: #f8f9ff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-custom-feature:hover {
    background: #e3f2fd;
    border-color: #1565c0;
}

.add-feature-icon {
    color: #1976d2;
    font-weight: bold;
}

.add-feature-text {
    color: #1976d2;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Security Notice Styles */
.security-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.security-icon {
    color: #4caf50;
    font-size: 1rem;
    flex-shrink: 0;
}

.security-text {
    color: #2e7d32;
    font-weight: 500;
    line-height: 1.4;
}

/* Live Preview Section Styles */
.live-preview-section {
    margin-bottom: 2rem;
}

.preview-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.device-selector,
.view-selector {
    display: flex;
    gap: 0.5rem;
}

.device-btn,
.view-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.device-btn:hover,
.view-btn:hover {
    border-color: #1976d2;
    background: #f8f9ff;
}

.device-btn.active,
.view-btn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.preview-container {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.preview-frame {
    display: block;
}

.preview-frame.hidden {
    display: none;
}

.preview-frame iframe {
    border: none;
    width: 100%;
    height: 600px;
    background: white;
}

.code-viewer {
    background: #f8f9fa;
    min-height: 600px;
}

.code-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: white;
}

.code-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.code-tab:hover {
    color: #1976d2;
    background: #f8f9ff;
}

.code-tab.active {
    color: #1976d2;
    border-bottom-color: #1976d2;
    background: #f8f9ff;
}

.code-content {
    position: relative;
}

.code-block {
    display: none;
    margin: 0;
    padding: 1.5rem;
    background: #f8f9fa;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    max-height: 550px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-block.active {
    display: block;
}

/* Components Showcase Styles */
.components-showcase {
    margin-bottom: 2rem;
}

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

.component-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.2s ease;
}

.component-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.component-card h5 {
    margin: 0 0 0.75rem 0;
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
}

.component-preview {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.component-demo {
    max-width: 100%;
}

.copy-code-btn {
    width: 100%;
    padding: 0.5rem;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.copy-code-btn:hover {
    background: #1565c0;
}

/* Button Progress Spinner */
.btn-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

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

.btn-text {
    display: inline-block;
}

/* Button states during API calls */
.next-tab-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.generate-assets-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.select-system-btn {
    background: #1976d2;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

.select-system-btn:hover {
    background: #1565c0;
}

.select-system-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Design system selection visual feedback */
.design-system-card.selected {
    border-color: #1976d2;
    background: #f8f9ff;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

.design-system-card.selected .select-system-btn {
    background: #4caf50;
    color: white;
}

.design-system-card.selected .select-system-btn:before {
    content: "✓ ";
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-body {
        padding: 1.5rem;
    }
    
    .preferences-grid {
        grid-template-columns: 1fr;
    }
    
    .navigation-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-cards {
        grid-template-columns: 1fr;
    }
    
    .results-tabs {
        font-size: 0.8rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .tab-panel {
        padding: 1rem;
    }
    
    .ia-section {
        padding: 1.5rem;
    }
    
    /* Wireframe top section responsive */
    .wireframe-top-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .wireframe-left-top {
        order: 1;
    }
    
    .global-design-selector {
        order: 2;
        min-width: 100%;
    }
    
    .design-system-dropdown {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-design-modal {
        width: 95vw;
        height: 95vh;
        margin: 2.5vh auto;
    }
    
    .modal-header,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modules-container {
        margin-left: 1rem;
    }
    
    .approval-options {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .approval-option label {
        padding: 0.75rem;
    }
    
    .themes-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .theme-card, .module-card {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .feature-tags {
        gap: 0.2rem;
    }
    
    .feature-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .feature-checkboxes {
        gap: 0.4rem;
    }
    
    .feature-checkbox-item {
        gap: 0.4rem;
    }
    
    .feature-name {
        font-size: 0.8rem;
    }
    
    .feature-desc {
        font-size: 0.7rem;
    }
    
    .add-custom-card {
        min-height: 100px;
    }
    
    .add-custom-icon {
        font-size: 1.5rem;
        margin-right: 0.75rem;
    }
    
    .add-custom-title {
        font-size: 1rem;
    }
    
    .add-custom-description {
        font-size: 0.8rem;
    }
    
    .add-custom-feature {
        padding: 0.4rem;
    }
    
    .add-feature-text {
        font-size: 0.8rem;
    }
} 

/* Design System Selection Modal Styles */
.design-system-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.design-system-info h5 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.design-system-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.tailwind-classes {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f1f5f9;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.tailwind-classes small {
    color: #475569;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
}

/* Export Section Styles */
.export-section {
    padding: 1rem;
}

.export-section h4 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.125rem;
    font-weight: 600;
}

.export-section p {
    margin: 0 0 1.5rem 0;
    color: #64748b;
    font-size: 0.875rem;
}

.export-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.export-option {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.export-option h5 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.export-option p {
    margin: 0 0 1rem 0;
    color: #64748b;
    font-size: 0.875rem;
}

.export-btn {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.export-btn:hover {
    background: #2563eb;
}

.usage-instructions {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.usage-instructions h5 {
    margin: 0 0 0.75rem 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.usage-instructions ol {
    margin: 0;
    padding-left: 1.25rem;
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.6;
}

.usage-instructions li {
    margin-bottom: 0.5rem;
}

/* React Component Preview Styles */
.react-preview-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.react-preview-header h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.125rem;
    font-weight: 600;
}

.react-preview-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

.react-code-section {
    margin-bottom: 1.5rem;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.code-header h5 {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.code-actions {
    display: flex;
    gap: 0.5rem;
}

.copy-code-btn {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-code-btn:hover {
    background: #059669;
}

.react-code {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

.react-info-section {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-box h5 {
    margin: 0 0 0.75rem 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.info-box p {
    margin: 0 0 0.5rem 0;
    color: #475569;
    font-size: 0.875rem;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Preview Fallback Styles */
.preview-fallback {
    padding: 2rem;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 1rem;
}

.fallback-message h4 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.125rem;
    font-weight: 600;
}

.fallback-message p {
    margin: 0 0 0.75rem 0;
    color: #64748b;
    font-size: 0.875rem;
}

.preview-btn {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    /* margin-top: 1rem; */
}

.preview-btn:hover {
    background: #2563eb;
} 

/* Floating Preview Panel */
.preview-panel {
    position: relative;
    /* bottom: 20px; */
    /* right: 20px; */
    width: auto;
    /* max-height: 500px; */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(229, 231, 235, 0.8);
    transition: all 0.3s ease;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Component Preview Styles */
.component-preview {
    padding: 2rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin: 1rem;
}

.preview-info h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.125rem;
    font-weight: 600;
}

.preview-info p {
    margin: 0 0 1.5rem 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.preview-mockup {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.mockup-header {
    background: #3b82f6;
    color: #ffffff;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.mockup-content {
    padding: 1.5rem;
}

.mockup-content p {
    margin: 0 0 0.75rem 0;
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.5;
}

.mockup-content p:last-child {
    margin-bottom: 0;
}

.mockup-note {
    padding: 1rem;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.8rem;
}

.mockup-note strong {
    color: #1e293b;
}

@media (max-width: 768px) {
    .wireframe-comparison {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .ascii-view,
    .preview-view {
        padding: 0.75rem;
    }
    
    .wireframe-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .preview-actions {
        flex-direction: column;
        align-items: stretch;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding-top: 8px;
    }
    
    .mode-toggle {
        justify-content: center;
    }
} 

.preview-toolbar {
    display: flex;
    gap: 6px;
}

.icon-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
}

.icon-btn:hover {
    background: #f3f4f6;
}

/* Hide nested preview header inside inline previews since toolbar is above */
.inline-preview .preview-header { display: none !important; }

/* Improve toggle buttons look (ASCII / Preview) */
.mode-toggle {
    display: inline-flex;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    gap: 0px;
}
.toggle-btn {
    padding: 8px 14px;
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    border-radius: 0px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.toggle-btn .toggle-icon {
    font-size: 12px;
    font-weight: 600;
}
.toggle-btn .toggle-text {
    font-size: 14px;
    font-weight: 500;
}
.toggle-btn.active { 
    background: #3b82f6; 
    color: white; 
}
.toggle-btn:not(.active) {
    background: #f3f4f6;
    color: #6b7280;
}

.wireframes-panel .tab-actions{
    display: none;
}

.flow-inline {
  /* margin: 8px 0 12px 0; */
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 1rem;
  /* background: #f0f9ff; */
  /* border: 1px solid #bae6fd; */
  border-radius: 8px;
  padding-top: 0rem;
  padding-left: 0rem;
}
.flow-inline .flow-pill {
  flex-shrink: 0;
  background: #d0ecff;
  color: #1e40af;
  border: none;
  border-radius: 16px;
  padding: 0.375rem 0.875rem;
  font-size: 12px;
  font-weight: 600;
}
.flow-inline .flow-text {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  padding-top: 0rem;
}

.modal-actions{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 0px;
    border-top: 0px;
}

/* === Wireframe Editor Component Styles === */

/* Wireframe header section with margin from top */
.wireframe-editor .wireframe-header-section {
  background: transparent;
  border: none;
}

/* Modern action buttons */
.action-btn-modern {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn-modern:hover {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

.action-btn-modern:active {
  background: #e5e7eb;
}

/* Wireframe editor container */
.wireframe-editor {
  background: white;
  border-radius: 8px;
}

/* Wireframe screen container - looks like an actual screen */
.wireframe-screen-container {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.2s ease;
}

.wireframe-screen-container:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Screen header with app-like appearance */
.wireframe-screen-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.screen-label {
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}

.screen-indicator {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Scoped button styling for wireframe actions */
.wireframe-editor .wireframe-actions-bottom .action-btn {
  background: transparent;
  color: #6b7280;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wireframe-editor .wireframe-actions-bottom .action-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Wireframe actions bottom bar */
.wireframe-editor .wireframe-actions-bottom {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

/* Scoped ASCII area styling for inline editing */
.wireframe-editor .ascii-wireframe-editable {
  height: 400px;
  resize: none;
  font-family: ui-monospace, 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 1rem;
  background: #f8fafc;
  color: #1e293b;
  white-space: pre;
  overflow-x: auto;
  width: 100%;
  border: none;
  border-radius: 0 0 8px 8px;
}

.wireframe-editor .ascii-wireframe-editable:focus {
  outline: none;
  background: #f1f5f9;
}

.wireframe-editor .ascii-wireframe-editable::placeholder {
  color: #94a3b8;
  font-style: italic;
}

/* Scoped edit note styling */
.wireframe-editor .edit-note-no-bg {
  color: #6b7280;
  background: transparent;
  border: none;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* Auto-save indicator - scoped to wireframe editor */
.wireframe-editor .auto-save-indicator {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 1;
  transition: opacity 2s ease-out;
  z-index: 10;
  pointer-events: none;
}

/* Error boundary styling */
.wireframe-error {
  margin: 1rem 0;
}

.product-design-modal-content{
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-out;
    
    /* Hide scrollbar for Chrome, Safari and Opera */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.inline-progress-display{
    width: 450px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: #718096;
}

.product-design-results .results-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    position: relative;
    top: 0;
    z-index: 1001;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}