Spaces:
Running
Running
| apple_css = """ | |
| :root { | |
| --ios-blur: 20px; | |
| --ios-radius: 20px; | |
| --ios-btn-radius: 14px; | |
| --ios-blue: #007AFF; | |
| --ios-blue-hover: #005ecb; | |
| --ios-bg-light: #F2F2F7; | |
| --ios-card-light: #FFFFFF; | |
| --ios-text-primary: #000000; | |
| --ios-text-secondary: #8E8E93; | |
| --ios-border-light: rgba(60, 60, 67, 0.12); | |
| --ios-bg-dark: #000000; | |
| --ios-card-dark: #1C1C1E; | |
| --ios-text-primary-dark: #FFFFFF; | |
| --ios-text-secondary-dark: #98989F; | |
| --ios-border-dark: rgba(84, 84, 88, 0.35); | |
| } | |
| /* --- Global Reset & Typography --- */ | |
| body, .gradio-container { | |
| font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; | |
| -webkit-font-smoothing: antialiased !important; | |
| color: var(--ios-text-primary); | |
| } | |
| .gradio-container { | |
| max-width: 900px !important; | |
| background-color: var(--ios-bg-light) !important; | |
| padding: 24px !important; | |
| } | |
| /* --- Scrollbar --- */ | |
| ::-webkit-scrollbar { | |
| width: 8px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: #c1c1c1; | |
| border-radius: 4px; | |
| } | |
| /* --- Header --- */ | |
| .header-container { | |
| text-align: center; | |
| margin-bottom: 32px; | |
| margin-top: 16px; | |
| } | |
| .main-title { | |
| font-size: 34px !important; | |
| font-weight: 700 !important; | |
| letter-spacing: -0.5px !important; | |
| margin: 0 0 8px 0 !important; | |
| color: var(--ios-text-primary) !important; | |
| } | |
| .subtitle { | |
| font-size: 17px !important; | |
| font-weight: 400 !important; | |
| color: var(--ios-text-secondary) !important; | |
| margin: 0 !important; | |
| } | |
| /* --- iOS Card Design --- */ | |
| .input-section, .output-section { | |
| background: var(--ios-card-light); | |
| border-radius: var(--ios-radius) !important; | |
| padding: 24px !important; | |
| margin-bottom: 20px !important; | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important; | |
| border: 1px solid rgba(255,255,255,0.4) !important; | |
| } | |
| /* --- Inputs (Text, Dropdowns, Sliders) --- */ | |
| textarea, input[type="text"], select, .gr-textbox, .gr-dropdown { | |
| background-color: #EFEFF4 !important; /* iOS Input Background */ | |
| border: 1px solid transparent !important; | |
| border-radius: 10px !important; | |
| padding: 12px 14px !important; | |
| font-size: 17px !important; | |
| color: var(--ios-text-primary) !important; | |
| transition: all 0.2s ease !important; | |
| -webkit-appearance: none !important; | |
| } | |
| textarea:focus, input:focus, select:focus { | |
| outline: none !important; | |
| background-color: #FFFFFF !important; | |
| box-shadow: 0 0 0 2px var(--ios-blue) !important; | |
| } | |
| /* Sliders */ | |
| input[type=range] { | |
| -webkit-appearance: none; | |
| background: transparent; | |
| } | |
| input[type=range]::-webkit-slider-thumb { | |
| -webkit-appearance: none; | |
| height: 24px; | |
| width: 24px; | |
| border-radius: 50%; | |
| background: #FFFFFF; | |
| box-shadow: 0 2px 6px rgba(0,0,0,0.3); | |
| margin-top: -10px; | |
| cursor: pointer; | |
| } | |
| input[type=range]::-webkit-slider-runnable-track { | |
| width: 100%; | |
| height: 4px; | |
| background: #D1D1D6; | |
| border-radius: 2px; | |
| } | |
| /* --- Tabs --- */ | |
| .tabs { | |
| border-bottom: 1px solid transparent !important; | |
| background: transparent !important; | |
| } | |
| .tabitem { | |
| border: none !important; | |
| font-size: 15px !important; | |
| font-weight: 500 !important; | |
| color: var(--ios-text-secondary) !important; | |
| padding: 10px 16px !important; | |
| background: transparent !important; | |
| border-radius: 8px !important; | |
| transition: all 0.2s ease !important; | |
| } | |
| .tabitem.selected { | |
| color: var(--ios-blue) !important; | |
| background: rgba(0, 122, 255, 0.1) !important; | |
| font-weight: 600 !important; | |
| } | |
| /* --- Buttons --- */ | |
| button.primary { | |
| background-color: var(--ios-blue) !important; | |
| color: white !important; | |
| border: none !important; | |
| border-radius: var(--ios-btn-radius) !important; | |
| padding: 14px 24px !important; | |
| font-size: 17px !important; | |
| font-weight: 600 !important; | |
| transition: transform 0.1s ease, background-color 0.2s ease !important; | |
| box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25) !important; | |
| cursor: pointer !important; | |
| width: 100%; | |
| } | |
| button.primary:hover { | |
| background-color: var(--ios-blue-hover) !important; | |
| } | |
| button.primary:active { | |
| transform: scale(0.97) !important; | |
| } | |
| button.secondary { | |
| background-color: rgba(118, 118, 128, 0.12) !important; | |
| color: var(--ios-blue) !important; | |
| border: none !important; | |
| border-radius: var(--ios-btn-radius) !important; | |
| padding: 12px 20px !important; | |
| font-size: 17px !important; | |
| font-weight: 600 !important; | |
| transition: background-color 0.2s !important; | |
| } | |
| button.secondary:hover { | |
| background-color: rgba(118, 118, 128, 0.2) !important; | |
| } | |
| /* --- Accordions --- */ | |
| .gr-accordion { | |
| border: none !important; | |
| background: transparent !important; | |
| } | |
| .gr-accordion-label { | |
| font-size: 16px !important; | |
| font-weight: 600 !important; | |
| padding: 12px 0 !important; | |
| color: var(--ios-text-primary) !important; | |
| border-bottom: 1px solid var(--ios-border-light) !important; | |
| } | |
| /* --- Footer --- */ | |
| .footer-text { | |
| margin-top: 40px; | |
| color: var(--ios-text-secondary) !important; | |
| font-size: 13px !important; | |
| text-align: center; | |
| } | |
| .attribution-link { | |
| color: var(--ios-blue) !important; | |
| text-decoration: none !important; | |
| } | |
| /* --- Dark Mode Overrides --- */ | |
| .dark .gradio-container { | |
| background-color: var(--ios-bg-dark) !important; | |
| } | |
| .dark .main-title { | |
| color: var(--ios-text-primary-dark) !important; | |
| } | |
| .dark .subtitle { | |
| color: var(--ios-text-secondary-dark) !important; | |
| } | |
| .dark .input-section, | |
| .dark .output-section { | |
| background: var(--ios-card-dark) !important; | |
| border-color: var(--ios-border-dark) !important; | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important; | |
| } | |
| .dark textarea, | |
| .dark input, | |
| .dark select { | |
| background-color: #2C2C2E !important; | |
| color: var(--ios-text-primary-dark) !important; | |
| border-color: var(--ios-border-dark) !important; | |
| } | |
| .dark .gr-accordion-label { | |
| color: var(--ios-text-primary-dark) !important; | |
| border-color: var(--ios-border-dark) !important; | |
| } | |
| .dark .tabitem.selected { | |
| background: rgba(10, 132, 255, 0.2) !important; | |
| } | |
| .dark button.primary { | |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important; | |
| } | |
| /* --- Mobile Responsive --- */ | |
| @media (max-width: 768px) { | |
| .gradio-container { | |
| padding: 16px !important; | |
| } | |
| .main-title { | |
| font-size: 28px !important; | |
| } | |
| .input-section, .output-section { | |
| padding: 16px !important; | |
| border-radius: 16px !important; | |
| } | |
| button.primary { | |
| padding: 16px !important; /* Larger touch targets */ | |
| } | |
| } | |
| """ |