File size: 5,584 Bytes
e1c010e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | """
src/ui/styles.py β Custom CSS for the Codevally VLA Demo UI.
All visual styling is centralised here so that layout.py stays
focused purely on component structure.
"""
CUSTOM_CSS: str = """
/* ββ Google Font ββ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
/* ββ Root & Body ββ */
:root {
--cv-blue: #1A4BDB;
--cv-dark: #0D1B3E;
--cv-accent: #00D4FF;
--cv-glass: rgba(255,255,255,0.06);
--cv-border: rgba(255,255,255,0.1);
--cv-success: #22C55E;
--cv-warn: #F59E0B;
--cv-error: #EF4444;
}
body, .gradio-container {
font-family: 'Inter', system-ui, sans-serif !important;
background: linear-gradient(135deg, #0a0f1e 0%, #0d1b3e 50%, #0a0f1e 100%) !important;
min-height: 100vh;
}
/* ββ Header Banner ββ */
.cv-header {
background: linear-gradient(135deg, #0D1B3E 0%, #1A2E5E 60%, #0D1B3E 100%);
border: 1px solid var(--cv-border);
border-radius: 16px;
padding: 28px 36px;
margin-bottom: 20px;
position: relative;
overflow: hidden;
}
.cv-header::before {
content: '';
position: absolute;
top: -60px; right: -60px;
width: 220px; height: 220px;
background: radial-gradient(circle, rgba(0,212,255,0.12) 0%, transparent 70%);
border-radius: 50%;
}
.cv-header::after {
content: '';
position: absolute;
bottom: -40px; left: 20%;
width: 140px; height: 140px;
background: radial-gradient(circle, rgba(26,75,219,0.15) 0%, transparent 70%);
border-radius: 50%;
}
/* ββ Badges ββ */
.cv-badge {
display: inline-block;
background: rgba(0,212,255,0.12);
color: var(--cv-accent);
border: 1px solid rgba(0,212,255,0.3);
border-radius: 20px;
padding: 3px 12px;
font-size: 12px;
font-weight: 500;
margin: 2px 4px 2px 0;
letter-spacing: 0.03em;
}
/* ββ Cards ββ */
.cv-card {
background: var(--cv-glass);
backdrop-filter: blur(12px);
border: 1px solid var(--cv-border);
border-radius: 16px;
padding: 20px;
transition: border-color 0.2s;
}
.cv-card:hover { border-color: rgba(0,212,255,0.25); }
/* ββ Section labels ββ */
.cv-section-label {
font-size: 11px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--cv-accent);
margin-bottom: 8px;
}
/* ββ Run button ββ */
button.primary {
background: linear-gradient(135deg, var(--cv-blue) 0%, #2563EB 100%) !important;
border: none !important;
border-radius: 10px !important;
font-weight: 600 !important;
font-size: 15px !important;
letter-spacing: 0.02em !important;
box-shadow: 0 4px 20px rgba(26,75,219,0.4) !important;
transition: transform 0.15s, box-shadow 0.15s !important;
}
button.primary:hover {
transform: translateY(-1px) !important;
box-shadow: 0 6px 28px rgba(26,75,219,0.55) !important;
}
button.primary:active { transform: translateY(0) !important; }
/* ββ Tabs ββ */
.tabs .tab-nav { border-bottom: 1px solid var(--cv-border) !important; }
.tabs .tab-nav button {
font-weight: 500 !important;
color: rgba(255,255,255,0.55) !important;
border-radius: 8px 8px 0 0 !important;
}
.tabs .tab-nav button.selected {
color: var(--cv-accent) !important;
border-bottom: 2px solid var(--cv-accent) !important;
background: rgba(0,212,255,0.07) !important;
}
/* ββ Inputs ββ */
input, textarea, .block { border-radius: 10px !important; }
/* ββ Footer ββ */
.cv-footer {
text-align: center;
padding: 16px 0 6px;
font-size: 13px;
color: rgba(255,255,255,0.35);
}
.cv-footer a {
color: var(--cv-accent);
text-decoration: none;
font-weight: 500;
}
.cv-footer a:hover { text-decoration: underline; }
/* ββ Status box ββ */
.status-box {
background: rgba(255,255,255,0.04);
border-radius: 10px;
border: 1px solid var(--cv-border);
padding: 10px 14px;
font-size: 14px;
min-height: 40px;
}
/* ββ How it works strip ββ */
.how-it-works {
display: flex;
gap: 0;
margin: 18px 0 8px;
border-radius: 12px;
overflow: hidden;
border: 1px solid var(--cv-border);
}
.hiw-step {
flex: 1;
padding: 14px 12px;
text-align: center;
background: rgba(255,255,255,0.03);
border-right: 1px solid var(--cv-border);
font-size: 12px;
color: rgba(255,255,255,0.7);
}
.hiw-step:last-child { border-right: none; }
.hiw-step .hiw-icon { font-size: 20px; display: block; margin-bottom: 4px; }
.hiw-step .hiw-label {
font-weight: 600; font-size: 11px; letter-spacing: 0.05em;
color: var(--cv-accent); display: block; margin-bottom: 2px;
text-transform: uppercase;
}
/* ββ Hide default Gradio footer bar ββ */
footer { display: none !important; }
.gradio-container ~ footer { display: none !important; }
/* ββ Scrollable Detection JSON box ββ */
#result_tabs .code-wrap,
#result_tabs .cm-scroller,
#result_tabs .codemirror-wrapper {
max-height: 380px !important;
overflow-y: auto !important;
scrollbar-width: thin;
scrollbar-color: rgba(0,212,255,0.4) rgba(255,255,255,0.05);
}
#result_tabs .code-wrap::-webkit-scrollbar { width: 6px; }
#result_tabs .code-wrap::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
#result_tabs .code-wrap::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.4); border-radius: 3px; }
#result_tabs .code-wrap::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.65); }
"""
|