/* ==========================================================================
   SHARED UI COMPONENTS - Ortak Kullanılabilir Bileşenler
   ========================================================================== */

:root {
    --model-try-on-accent: #007eff;
    --success-color: #22c55e;
    --error-color: #ef4444;
}
/* ==========================================================================
   1. HEADER & TITLE COMPONENTS
   ========================================================================== */

.content-header-section {
    margin-bottom: 32px;
    text-align: center;
}

.main-tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
    line-height: 1.2;
}

.tool-description-text {
    font-size: 1.125rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   2. UPLOADER COMPONENTS
   ========================================================================== */

.interactive-controls {
    margin-bottom: 48px;
}

.uploader-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 24px;
}

/* Uploader Tabs */
.uploader-tabs {
    display: flex;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tab-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.tab-link:hover {
    background: #edf2f7;
    color: #475569;
}

.tab-link.active {
    background: white;
    color: #1e293b;
    border-bottom-color: #3b82f6;
}

.tab-link svg {
    transition: transform 0.2s ease;
}

.tab-link:hover svg {
    transform: translateY(-1px);
}

/* Uploader Content */
.uploader-content {
    position: relative;
}

.tab-pane {
    display: none;
    padding: 32px;
}

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

/* Upload Zone */
.upload-zone-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-zone-area:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.upload-zone-area:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.upload-zone-area.drag-over {
    border-color: #10b981;
    background: #ecfdf5;
    transform: scale(1.02);
}

.upload-icon-display {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    color: #64748b;
    transition: all 0.3s ease;
}

.upload-zone-area:hover .upload-icon-display {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.upload-main-text {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.upload-sub-text {
    font-size: 14px;
    color: #64748b;
}

.upload-sub-text span {
    color: #3b82f6;
    font-weight: 500;
}

/* URL Input Group */
.url-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.url-input-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.url-input-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.url-input-field:invalid {
    border-color: #ef4444;
}

.url-submit-btn {
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.url-submit-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.url-submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   3. ACTION BUTTONS
   ========================================================================== */

.generate-action-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generate-action-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.generate-action-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.generate-action-button .loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.generate-icon {
    transition: transform 0.2s ease;
}

.generate-action-button:hover .generate-icon {
    transform: scale(1.1);
}

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

/* ==========================================================================
   4. RESULTS SECTION
   ========================================================================== */

.results-display-area {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.results-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.results-title-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.action-buttons-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.primary-action-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-action-button:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.secondary-action-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-action-button:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

/* Result Container */
.result-image-container {
    padding: 32px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.placeholder-icon-circle {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #94a3b8;
}

.placeholder-content p {
    font-size: 16px;
    margin: 0;
    max-width: 300px;
}

/* Processing Animation */
.processing-content {
    text-align: center;
    color: #4a5568;
}

.ai-processing-animation {
    margin-bottom: 24px;
}

.ai-brain-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #667eea;
    animation: pulse 2s ease-in-out infinite;
}

.processing-dots {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.processing-dots span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.processing-dots span:nth-child(1) { animation-delay: -0.32s; }
.processing-dots span:nth-child(2) { animation-delay: -0.16s; }

.processing-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.processing-content p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Error Message */
.error-message-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    color: #dc2626;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 16px 20px;
    color: #dc2626;
    font-weight: 500;
    text-align: center;
    margin: 20px 0;
    animation: slideInDown 0.3s ease-out;
}

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

/* ==========================================================================
   6. PAGINATION COMPONENTS
   ========================================================================== */

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
}

.pagination-info {
    color: #6b7280;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

.pagination-pages {
    display: flex;
    gap: 4px;
    margin: 0 8px;
}

.pagination-page {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-page:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.pagination-page.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-page.active:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .pagination-page {
        font-size: 12px;
        padding: 6px 10px;
        min-width: 36px;
    }
}

/* ==========================================================================
   5. COMPARE GRID (Before/After)
   ========================================================================== */

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

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

.compare-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compare-col img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.compare-col img:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   6. ANIMATIONS
   ========================================================================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .main-tool-title {
        font-size: 2rem;
    }
    
    .tool-description-text {
        font-size: 1rem;
    }
    
    
    .tab-pane {
        padding: 24px;
    }
    
    .url-input-group {
        flex-direction: column;
    }
    
    .results-header-section {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .action-buttons-group {
        justify-content: center;
    }
    
    .compare-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .result-image-container {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .generate-action-button {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .upload-zone-area {
        min-height: 160px;
    }
    
    .upload-icon-display {
        width: 40px;
        height: 40px;
    }
    
    .upload-main-text {
        font-size: 16px;
    }
}


/* ==========================================================================
   3. CAMERA STYLES
   ========================================================================== */

.camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-height: 300px;
}

#cameraPreview {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

#cameraCanvas {
    display: none;
}

.camera-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.camera-start-btn,
.camera-capture-btn,
.camera-stop-btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.camera-start-btn {
    background: var(--primary-color);
    color: white;
}

    .camera-start-btn:hover {
        background: var(--primary-hover);
        transform: translateY(-1px);
    }

.camera-capture-btn {
    background: var(--success-color);
    color: white;
}

    .camera-capture-btn:hover {
        background: #16a34a;
        transform: translateY(-1px);
    }

.camera-stop-btn {
    background: var(--error-color);
    color: white;
}

    .camera-stop-btn:hover {
        background: #dc2626;
        transform: translateY(-1px);
    }

.captured-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

    .captured-preview img {
        width: 100%;
        max-width: 400px;
        height: auto;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-medium);
    }

.capture-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-retry,
.btn-use {
    padding: 10px 18px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
}

.btn-retry {
    background: var(--border-color);
    color: var(--text-color);
}

    .btn-retry:hover {
        background: #d1d5db;
        transform: translateY(-1px);
    }

.btn-use {
    background: var(--primary-color);
    color: white;
}

    .btn-use:hover {
        background: var(--primary-hover);
        transform: translateY(-1px);
    }