class Style: """Manages all CSS styling for Pixcribe application""" @staticmethod def get_all_css() -> str: """ Return complete CSS styling for the entire application. Returns: Complete CSS string with all styling rules """ return """ /* ==================== Global Reset & Base ==================== */ * { margin: 0; padding: 0; box-sizing: border-box; } .gradio-container { background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%) !important; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif !important; padding: 0 !important; max-width: 100% !important; min-height: 100vh !important; } /* Main content wrapper - Generous padding to prevent edge clipping */ .contain { max-width: 1600px !important; margin: 0 auto !important; padding: 64px 96px 96px 96px !important; } /* ==================== Header ==================== */ .app-header { text-align: center; margin-bottom: 72px; animation: fadeInDown 0.8s ease-out; padding: 0 32px; } @keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } } .app-title { font-size: 72px; font-weight: 800; background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 24px; letter-spacing: -0.05em; line-height: 1.1; } .app-subtitle { font-size: 26px; font-weight: 400; color: #6C757D; margin-bottom: 0; letter-spacing: 0.01em; } /* ==================== Layout ==================== */ .main-row { gap: 48px !important; margin-bottom: 48px !important; } /* Left column elegant container */ .main-row > .column:first-child { background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(252, 253, 254, 0.6) 100%) !important; border-radius: 28px !important; padding: 40px !important; border: 1px solid rgba(52, 152, 219, 0.08) !important; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important; } /* Right column elegant container */ .main-row > .column:last-child { background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(252, 253, 254, 0.6) 100%) !important; border-radius: 28px !important; padding: 40px !important; border: 1px solid rgba(52, 152, 219, 0.08) !important; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important; } /* ==================== Premium Cards - Light & Spacious ==================== */ .upload-card { background: rgba(255, 255, 255, 0.95) !important; border-radius: 32px !important; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02) !important; border: 1px solid rgba(0, 0, 0, 0.05) !important; padding: 48px !important; margin-bottom: 32px !important; transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important; overflow: visible !important; } .results-card { background: transparent !important; border-radius: 0 !important; box-shadow: none !important; border: none !important; padding: 0 !important; margin-bottom: 32px !important; overflow: visible !important; } /* Caption Results Container - Elegant Design */ .caption-results-container { background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(252, 253, 254, 0.7) 100%) !important; border-radius: 28px !important; padding: 44px !important; border: 1px solid rgba(52, 152, 219, 0.1) !important; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(52, 152, 219, 0.03) !important; margin-bottom: 40px !important; overflow: visible !important; } .upload-card:hover { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.06) !important; transform: translateY(-6px); border-color: rgba(52, 152, 219, 0.3) !important; } /* ==================== Upload Area ==================== */ .upload-area { border: 3px dashed rgba(52, 152, 219, 0.35) !important; border-radius: 28px !important; background: linear-gradient(135deg, rgba(52, 152, 219, 0.03) 0%, rgba(52, 152, 219, 0.06) 100%) !important; padding: 96px 40px !important; text-align: center !important; transition: all 0.3s ease !important; min-height: 360px !important; } .upload-area:hover { border-color: #3498DB !important; background: linear-gradient(135deg, rgba(52, 152, 219, 0.06) 0%, rgba(52, 152, 219, 0.12) 100%) !important; transform: scale(1.02); } /* ==================== Section Titles - Consistent Spacing ==================== */ .section-title { font-size: 28px !important; font-weight: 700 !important; color: #2C3E50 !important; margin-bottom: 20px !important; letter-spacing: -0.02em !important; padding-bottom: 0 !important; border-bottom: none !important; text-align: left !important; margin-top: 0 !important; } .section-title-left { font-size: 28px !important; font-weight: 700 !important; color: #2C3E50 !important; margin-bottom: 20px !important; margin-top: 0 !important; letter-spacing: -0.02em !important; text-align: left !important; border-bottom: none !important; padding-bottom: 0 !important; } /* ==================== Form Elements - Generous Padding ==================== */ .settings-row { gap: 24px !important; margin-bottom: 28px !important; } .radio-group { background: rgba(248, 249, 250, 0.5) !important; border-radius: 20px !important; padding: 24px 28px !important; border: none !important; margin-bottom: 24px !important; border: 1px solid rgba(0, 0, 0, 0.04) !important; } .radio-group:last-child { margin-bottom: 0 !important; } /* Inline radio groups for side-by-side layout */ .radio-group-inline { background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(248, 249, 250, 0.5) 100%) !important; border-radius: 16px !important; padding: 20px !important; border: 1px solid rgba(52, 152, 219, 0.1) !important; margin-bottom: 0 !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important; transition: all 0.3s ease !important; } .radio-group-inline:hover { box-shadow: 0 4px 16px rgba(52, 152, 219, 0.08) !important; border-color: rgba(52, 152, 219, 0.2) !important; } .radio-group label { color: #6C757D !important; font-weight: 600 !important; font-size: 14px !important; margin-bottom: 16px !important; letter-spacing: 0.08em !important; text-transform: uppercase !important; display: block !important; text-align: left !important; } /* Radio group title (the actual input label) */ .radio-group > label:first-child { color: #2C3E50 !important; font-weight: 700 !important; font-size: 19px !important; margin-bottom: 16px !important; letter-spacing: -0.02em !important; text-transform: none !important; } /* Inline radio group title - BIGGER and BOLD */ .radio-group-inline > label:first-child { color: #2C3E50 !important; font-weight: 700 !important; font-size: 18px !important; margin-bottom: 14px !important; letter-spacing: -0.01em !important; text-transform: none !important; display: block !important; } .radio-group input[type="radio"] { accent-color: #3498DB !important; width: 22px !important; height: 22px !important; margin-right: 14px !important; } /* Radio option labels */ .radio-group > div > label { color: #495057 !important; font-weight: 500 !important; font-size: 17px !important; letter-spacing: -0.01em !important; text-transform: none !important; padding: 14px 20px !important; border-radius: 14px !important; transition: all 0.2s ease !important; cursor: pointer !important; display: flex !important; align-items: center !important; } /* Inline radio option labels - BIGGER */ .radio-group-inline > div > label { color: #495057 !important; font-weight: 500 !important; font-size: 16px !important; letter-spacing: -0.01em !important; text-transform: none !important; padding: 12px 16px !important; border-radius: 10px !important; transition: all 0.2s ease !important; cursor: pointer !important; display: flex !important; align-items: center !important; background: rgba(255, 255, 255, 0.6) !important; margin-bottom: 8px !important; border: 1px solid rgba(0, 0, 0, 0.04) !important; } .radio-group > div > label:hover { background: rgba(52, 152, 219, 0.08) !important; } .radio-group-inline > div > label:hover { background: rgba(52, 152, 219, 0.12) !important; transform: translateX(4px); } /* ==================== Button ==================== */ .generate-button { background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%) !important; color: white !important; border: none !important; border-radius: 20px !important; padding: 24px 64px !important; font-size: 19px !important; font-weight: 700 !important; cursor: pointer !important; box-shadow: 0 6px 24px rgba(52, 152, 219, 0.35), 0 3px 6px rgba(52, 152, 219, 0.25) !important; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; letter-spacing: -0.02em !important; width: 100% !important; margin-top: 24px !important; } .generate-button:hover { transform: translateY(-6px) scale(1.02) !important; box-shadow: 0 16px 48px rgba(52, 152, 219, 0.45), 0 6px 12px rgba(52, 152, 219, 0.35) !important; } .generate-button:active { transform: translateY(-3px) scale(1.01) !important; } /* ==================== Caption Cards - Light & Elegant ==================== */ .caption-card { background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%); backdrop-filter: blur(20px); border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 28px; padding: 32px 36px; margin-bottom: 28px; transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03); position: relative; } .caption-card:hover { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.06); transform: translateY(-6px); border-color: rgba(52, 152, 219, 0.3); } .caption-header { font-size: 15px; font-weight: 700; color: #6C757D; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 20px; } .caption-text { font-size: 21px; font-weight: 400; color: #2C3E50; line-height: 1.8; margin-bottom: 24px; letter-spacing: -0.01em; } .caption-hashtags { font-size: 18px; font-weight: 600; color: #3498DB; margin-bottom: 0; word-wrap: break-word; line-height: 1.75; } /* Copy Button */ .copy-button { position: absolute; top: 28px; right: 28px; background: rgba(52, 152, 219, 0.10); border: 1px solid rgba(52, 152, 219, 0.25); border-radius: 14px; padding: 12px 20px; font-size: 15px; font-weight: 600; color: #3498DB; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; } .copy-button:hover { background: rgba(52, 152, 219, 0.18); border-color: #3498DB; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(52, 152, 219, 0.25); } .copy-button:active { transform: translateY(0); } .copy-button.copied { background: rgba(39, 174, 96, 0.15); border-color: #27AE60; color: #27AE60; } /* ==================== Footer ==================== */ .app-footer { text-align: center; margin-top: 96px; padding-top: 64px; border-top: 3px solid rgba(0, 0, 0, 0.08); animation: fadeInUp 0.8s ease-out 0.3s backwards; } @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } .footer-text { font-size: 17px; color: #6C757D; line-height: 2.0; letter-spacing: -0.01em; font-weight: 500; } .footer-models { font-size: 15px; color: #ADB5BD; margin-top: 20px; font-weight: 600; letter-spacing: 0.03em; } /* ==================== Image Display ==================== */ .image-container { border-radius: 28px !important; overflow: hidden !important; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10), 0 3px 6px rgba(0, 0, 0, 0.06) !important; } .image-container img { border-radius: 28px !important; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.08) !important; } /* ==================== Responsive Design ==================== */ @media (max-width: 768px) { .contain { padding: 48px 32px 64px 32px !important; } .app-title { font-size: 52px; } .app-subtitle { font-size: 20px; } .upload-card, .options-card, .results-card { padding: 40px !important; } .upload-area { padding: 64px 32px !important; min-height: 280px !important; } .caption-card { padding: 28px; } .section-title { font-size: 30px !important; } .copy-button { top: 20px; right: 20px; padding: 10px 16px; font-size: 14px; } } /* ==================== Loading Animation ==================== */ @keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } } .loading { animation: shimmer 2s infinite; background: linear-gradient(to right, #f8f9fa 4%, #e9ecef 25%, #f8f9fa 36%); background-size: 1000px 100%; } /* ==================== Batch Processing Styles ==================== */ .batch-results-container { max-width: 1400px !important; margin: 0 auto !important; padding: 24px 0 !important; } .batch-result-card { background: white !important; border-radius: 16px !important; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important; margin-bottom: 20px !important; transition: all 0.3s ease !important; border: 1px solid rgba(0, 0, 0, 0.08) !important; } .batch-result-card:hover { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important; } .card-header { padding: 20px 24px !important; border-bottom: 1px solid #E9ECEF !important; cursor: pointer !important; display: flex !important; align-items: center !important; gap: 16px !important; } .card-thumbnail { width: 80px !important; height: 80px !important; object-fit: cover !important; border-radius: 8px !important; border: 2px solid #F8F9FA !important; } .card-title { font-size: 18px !important; font-weight: 600 !important; color: #2C3E50 !important; flex: 1 !important; } .card-status { font-size: 24px !important; } .card-content { padding: 24px !important; font-size: 15px !important; line-height: 1.6 !important; } .caption-section { margin-bottom: 24px !important; padding: 16px !important; background: #F8F9FA !important; border-radius: 12px !important; } .caption-label { font-weight: 600 !important; color: #495057 !important; margin-bottom: 8px !important; font-size: 14px !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; } .caption-text { line-height: 1.7 !important; color: #2C3E50 !important; margin-bottom: 12px !important; } .hashtags-list { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; margin-top: 12px !important; } .hashtag-item { background: #E8F4F8 !important; color: #2980B9 !important; padding: 6px 12px !important; border-radius: 8px !important; font-size: 13px !important; font-weight: 500 !important; } /* Progress Display Styles */ .progress-container { padding: 24px 32px !important; background: linear-gradient(135deg, #F0F3F7 0%, #E8EDF3 100%) !important; border-radius: 16px !important; margin: 24px 0 !important; } .progress-bar-wrapper { height: 12px !important; background: #DFE4EA !important; border-radius: 12px !important; overflow: hidden !important; margin: 16px 0 !important; } .progress-bar-fill { height: 100% !important; background: linear-gradient(90deg, #3498DB 0%, #2ECC71 100%) !important; border-radius: 12px !important; transition: width 0.4s ease !important; } .progress-text { font-size: 15px !important; color: #495057 !important; text-align: center !important; font-weight: 500 !important; } .progress-stats { display: flex !important; justify-content: space-between !important; margin-top: 12px !important; font-size: 14px !important; color: #6C757D !important; } /* Export Panel Styles */ .export-panel { padding: 24px !important; background: linear-gradient(135deg, #F8F9FA 0%, #ECEFF3 100%) !important; border-radius: 16px !important; margin: 32px 0 !important; border: 1px solid #DEE2E6 !important; } .export-panel-title { font-size: 18px !important; font-weight: 700 !important; color: #2C3E50 !important; margin-bottom: 16px !important; } .export-buttons-row { display: flex !important; gap: 16px !important; flex-wrap: wrap !important; } .export-button { padding: 12px 24px !important; background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%) !important; color: white !important; border: none !important; border-radius: 12px !important; cursor: pointer !important; font-size: 15px !important; font-weight: 600 !important; transition: all 0.3s ease !important; display: flex !important; align-items: center !important; gap: 8px !important; } .export-button:hover { background: linear-gradient(135deg, #2980B9 0%, #21618C 100%) !important; transform: translateY(-2px) !important; box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3) !important; } .export-button-icon { font-size: 18px !important; } /* Batch Summary Card */ .batch-summary-card { background: linear-gradient(135deg, #E8F8F5 0%, #D5F4E6 100%) !important; border-left: 4px solid #27AE60 !important; border-radius: 16px !important; padding: 24px 32px !important; margin: 24px 0 !important; } .summary-title { font-size: 20px !important; font-weight: 700 !important; color: #27AE60 !important; margin-bottom: 16px !important; } .summary-stats { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; gap: 16px !important; } .stat-item { text-align: center !important; padding: 12px !important; } .stat-value { font-size: 32px !important; font-weight: 700 !important; color: #2C3E50 !important; } .stat-label { font-size: 14px !important; color: #6C757D !important; margin-top: 4px !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; } /* Error Display */ .error-card-content { background: #FADBD8 !important; border: 2px solid #E74C3C !important; border-radius: 12px !important; padding: 16px !important; color: #C0392B !important; } .error-title { font-weight: 700 !important; font-size: 16px !important; margin-bottom: 8px !important; } .error-message { font-size: 14px !important; line-height: 1.5 !important; } """ print("✓ Style class defined")