/* ============================================
   Angles Pipeline - CSS Styles
   ============================================ */

/* Page Layout */
.angles-page {
    padding-top: 100px;
    min-height: 100vh;
    background: linear-gradient(180deg, #F0FDF9 0%, #FFFFFF 30%);
}

.angles-page .page-header {
    text-align: center;
    margin-bottom: 40px;
}

.angles-page .page-header h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 12px;
}

.angles-page .page-header .highlight {
    color: var(--primary);
}

.angles-page .page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Progress Steps */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto 48px;
    padding: 0 20px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
}

.step-item.active .step-circle,
.step-item.completed .step-circle {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.step-item.completed .step-circle {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.step-label {
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.step-item.active .step-label,
.step-item.completed .step-label {
    color: var(--primary);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-light);
    margin: 0 8px;
    margin-bottom: 20px;
}

.step-line.completed {
    background: var(--primary);
}

@media (max-width: 640px) {
    .step-label {
        display: none;
    }
    
    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* Wizard Content */
.wizard-content {
    max-width: 1000px;
    margin: 0 auto;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.step-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.step-card h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Input Tabs */
.input-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    width: fit-content;
}

.tab-btn {
    padding: 10px 24px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* URL Input */
.url-input-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.url-input-wrapper {
    display: flex;
    gap: 12px;
}

.url-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

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

.btn-fetch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-fetch:hover {
    background: #2d3a4f;
}

.input-hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.url-ai-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.url-ai-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group .required {
    color: #ef4444;
}

.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group select {
    cursor: pointer;
    background: white;
}

/* Images Dropzone */
.images-dropzone {
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
}

.images-dropzone:hover,
.images-dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.images-dropzone svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.images-dropzone p {
    margin: 0;
    color: var(--text-secondary);
}

.images-dropzone .hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Image Count Badge */
.image-count-badge {
    margin-left: 12px;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    animation: fadeIn 0.3s ease;
}

/* Images Preview Container */
.images-preview-container {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.images-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.preview-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.btn-clear-images {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-images:hover {
    background: #ef4444;
    color: white;
}

/* Images Preview */
.images-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-light);
    background: white;
    transition: all 0.2s ease;
}

.image-preview-item:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

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

.image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-preview-item:hover .remove-btn {
    opacity: 1;
}

.image-preview-item .remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Process Button */
.btn-process {
    width: 100%;
    margin-top: 16px;
}

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

/* Step 2: Product Review */
.product-review {
    margin-bottom: 32px;
}

.review-section {
    margin-bottom: 32px;
}

.review-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.product-details-display {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    line-height: 1.8;
    white-space: pre-wrap;
}

.processed-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.processed-image-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.processed-image-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.processed-image-card .image-info {
    padding: 16px;
}

.processed-image-card .image-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
}

.processed-image-card .image-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-height: 80px;
    overflow-y: auto;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Step 3: Brand Selection */
.brand-selection-section h3,
.highlights-section h3,
.strategy-section h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.brand-select-card {
    padding: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.brand-select-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.brand-select-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.brand-colors-preview {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.brand-colors-preview .color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.brand-select-card h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.brand-select-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Confirm Section */
.confirm-section {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.selected-brand-info {
    margin-bottom: 16px;
    font-weight: 500;
}

/* Highlights Display */
.highlights-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.highlights-display {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

.highlight-item {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
}

.highlight-item h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.highlight-item p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Strategy Section */
.strategy-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.strategy-display {
    margin-bottom: 32px;
}

.strategy-item {
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.strategy-item h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.strategy-item p {
    line-height: 1.7;
}

.strategy-item ul {
    margin: 0;
    padding-left: 20px;
}

.strategy-item li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Categories Selection */
.categories-selection {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.categories-selection h3 {
    margin-bottom: 8px;
}

.categories-selection .hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding: 4px;
    margin-bottom: 24px;
}

.category-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.category-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.category-checkbox {
    position: relative;
    cursor: pointer;
}

.category-checkbox input {
    opacity: 0;
    position: absolute;
}

.checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid var(--border-medium);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.category-checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.category-checkbox input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.category-info {
    flex: 1;
}

.category-info h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.category-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.category-config {
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border-light);
}

.config-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.config-row:last-child {
    margin-bottom: 0;
}

.config-row label {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 80px;
}

.config-row input {
    width: 60px;
    padding: 6px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
}

.btn-generate {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
}

/* Step 4: Angles Output */
.angles-output {
    margin-bottom: 32px;
}

.angle-category-group {
    margin-bottom: 32px;
}

.angle-category-header {
    padding: 16px 20px;
    background: var(--secondary);
    color: white;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.angle-category-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.angles-list {
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.angle-item {
    border-bottom: 1px solid var(--border-light);
}

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

.angle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.angle-header:hover {
    background: var(--bg-secondary);
}

.angle-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.angle-title h4 {
    font-size: 1rem;
    margin: 0;
}

.hook-count {
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.angle-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.angle-item.expanded .angle-toggle {
    transform: rotate(180deg);
}

.angle-content {
    display: none;
    padding: 0 20px 20px;
    background: white;
}

.angle-item.expanded .angle-content {
    display: block;
}

.angle-description {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.hooks-section h5 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.hooks-grid {
    display: grid;
    gap: 12px;
}

.hook-card {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hook-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.hook-card h6 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.hook-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hook-images-count {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Hook Reference Images */
.hook-ref-images {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.hook-ref-images .ref-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

.hook-ref-images .ref-thumbnails {
    display: flex;
    gap: 8px;
}

.hook-ref-images .ref-thumbnails img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-light);
    transition: all 0.2s ease;
}

.hook-ref-images .ref-thumbnails img:hover {
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.hook-no-ref {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Hook Image Generation Prompt */
.hook-prompt-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.hook-prompt-section .prompt-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    display: block;
    margin-bottom: 6px;
}

.hook-prompt-section .prompt-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    background: var(--bg-primary);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--secondary);
    margin: 0;
}

.btn-view-prompt {
    margin-top: 8px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--secondary);
    background: transparent;
    border: 1px solid var(--secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-prompt:hover {
    background: var(--secondary);
    color: white;
}

/* Prompt Modal */
.prompt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.prompt-modal {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

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

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

.prompt-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

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

.prompt-modal-close:hover {
    background: var(--error);
    color: white;
}

.prompt-modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.prompt-modal-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.prompt-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
}

.btn-copy-prompt {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-prompt:hover {
    background: var(--primary-dark);
}

/* Creative Reference Images */
.creative-ref-images {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.creative-ref-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 8px;
}

.creative-ref-thumbnails {
    display: flex;
    gap: 8px;
}

.creative-ref-thumbnails img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-light);
    transition: all 0.2s ease;
}

.creative-ref-thumbnails img:hover {
    border-color: var(--primary);
    transform: scale(1.15);
    box-shadow: var(--shadow-md);
    z-index: 10;
    position: relative;
}

/* Creative Prompt Section */
.creative-prompt-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.creative-prompt-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    margin-bottom: 6px;
}

.creative-prompt-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-view-prompt-creative {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--secondary);
    background: transparent;
    border: 1px solid var(--secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-prompt-creative:hover {
    background: var(--secondary);
    color: white;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

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

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Hook Modal */
.hook-modal-content {
    max-width: 700px;
}

.hook-modal-header {
    margin-bottom: 24px;
}

.hook-modal-header h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.hook-modal-header .angle-name {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hook-modal-description {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    line-height: 1.7;
}

.hook-modal-images h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.hook-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.hook-image-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.hook-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* No Brands Message */
.no-brands-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.no-brands-message a {
    color: var(--primary);
    font-weight: 600;
}

/* Two Column Layout for Step 2 */
.two-column-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.left-column,
.right-column {
    min-width: 0; /* Prevent overflow */
}

.review-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.review-section h3 svg {
    color: var(--primary);
}

/* Compact Brands Grid for Right Column */
.brands-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.brands-grid-compact .brand-select-card {
    padding: 14px;
}

.brands-grid-compact .brand-select-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.brands-grid-compact .brand-select-card p {
    display: none;
}

.brands-grid-compact .brand-colors-preview {
    margin-bottom: 8px;
}

.brands-grid-compact .brand-colors-preview .color-dot {
    width: 16px;
    height: 16px;
}

/* Editable Highlights Form */
.highlights-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.highlights-form .form-group {
    margin-bottom: 0;
}

.highlights-form .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.highlights-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.highlights-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.highlights-form textarea::placeholder {
    color: var(--text-muted);
}

.editable-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--primary);
    margin-left: auto;
}

/* Generate Highlights Button */
.btn-sm {
    padding: 10px 18px;
    font-size: 0.9rem;
}

/* Strategy Generation Section */
.strategy-generation-section {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 24px;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.05rem;
}

.btn-lg svg {
    margin-right: 8px;
}

/* Continue Button Disabled State */
#continue-to-step3:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Continue Button with loading state */
#continue-to-step3 .btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#continue-to-step3 .btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

#continue-to-step3 .btn-loading .spinner {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

/* Product Details Display Scrollable */
.product-details-display {
    max-height: 250px;
    overflow-y: auto;
}

/* Processed Images Grid - More Compact */
.processed-images-grid {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.processed-images-grid::-webkit-scrollbar {
    width: 6px;
}

.processed-images-grid::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.processed-images-grid::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 1024px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
    
    .brands-grid-compact {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .step-card {
        padding: 24px;
    }
    
    .url-input-wrapper {
        flex-direction: column;
    }
    
    .btn-fetch {
        width: 100%;
        justify-content: center;
    }
    
    .processed-images-grid {
        grid-template-columns: 1fr;
    }
    
    .brands-grid,
    .brands-grid-compact {
        grid-template-columns: 1fr 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .step-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .step-actions button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .brands-grid-compact {
        grid-template-columns: 1fr;
    }
}

/* ==================== Creatives Section ==================== */
.creatives-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--border-light);
}

.creatives-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.creatives-section h3 svg {
    color: var(--primary);
}

.creatives-section .hint {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.creatives-config {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.creatives-config .form-group {
    margin-bottom: 0;
}

.creatives-config select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.creatives-config select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-create-creatives {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
}

.btn-create-creatives .btn-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Generated Creatives Grid - Grouped by Angle (similar to Angles display) */
.generated-creatives {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.generated-creatives h3 {
    margin-bottom: 20px;
}

.creatives-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Creative Angle Group (similar to angle-category-group) */
.creative-angle-group {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.creative-angle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--secondary) 0%, #2d3a4f 100%);
    color: white;
}

.creative-angle-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.creative-angle-title svg {
    opacity: 0.8;
}

.creative-angle-title h3 {
    font-size: 1.1rem;
    margin: 0;
    color: white;
}

.creative-count {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.creative-angle-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 24px;
    background: var(--bg-secondary);
}

/* Creative Item (similar to hook-card but with image) */
.creative-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.creative-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.creative-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.creative-image-wrapper .creative-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.creative-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.creative-item:hover .creative-overlay {
    opacity: 1;
}

.download-btn-overlay {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn-overlay:hover {
    background: var(--primary);
    color: white;
}

.creative-details {
    padding: 20px;
}

.creative-hook-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 8px;
}

.creative-hook-label svg {
    color: var(--primary);
}

.creative-hook-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-primary);
}

.creative-details .creative-caption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.creative-details .creative-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.creative-details .creative-platform {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

/* No creatives message */
.no-creatives-message {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.no-creatives-message p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Creative generation progress */
.creative-progress {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.creative-progress .progress-text {
    font-weight: 600;
    margin-bottom: 10px;
}

.creative-progress .progress-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.creative-progress .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

@media (max-width: 768px) {
    .creatives-config {
        grid-template-columns: 1fr;
    }
    
    .creative-angle-content {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
    }
    
    .creative-angle-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .creative-angle-title {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .creative-details {
        padding: 16px;
    }
    
    .creative-hook-name {
        font-size: 0.95rem;
    }
}

