will / src /ui /streamlit /styles.py
matt1847's picture
機能追加: モデルラインナップ拡張とGradio UI移行
f94169f
"""
カスタムCSS定義
Streamlitアプリケーションのスタイルを定義する
"""
CUSTOM_CSS = """
<style>
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400&display=swap');
@keyframes emerge {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes breathe {
0%, 100% { opacity: 0.4; }
50% { opacity: 0.7; }
}
html, body, [class*="css"] {
font-family: 'IBM Plex Mono', monospace;
}
.stApp {
background-color: #0a0a0a;
color: #e0e0e0;
}
.block-container {
padding-top: 4rem;
padding-bottom: 4rem;
max-width: 640px;
}
h1, h2, h3 {
font-weight: 300;
letter-spacing: 0.1em;
text-align: center;
color: #e0e0e0;
}
p, li {
font-weight: 300;
line-height: 1.8;
color: #888;
}
.title {
font-size: 2rem;
font-weight: 300;
letter-spacing: 0.3em;
text-align: center;
margin-bottom: 0.5rem;
color: #e0e0e0;
}
.subtitle {
font-size: 0.75rem;
letter-spacing: 0.2em;
text-align: center;
color: #555;
margin-bottom: 3rem;
}
.debris-container {
background: linear-gradient(135deg, #0f0f0f 0%, #141414 100%);
border: 1px solid #222;
border-radius: 2px;
padding: 2rem;
margin: 2rem auto;
max-width: 100%;
text-align: center;
animation: emerge 0.6s ease-out;
}
.signal-img {
width: 100%;
max-width: 480px;
margin: 0 auto 1.5rem auto;
display: block;
opacity: 0.7;
}
.debris {
font-family: 'IBM Plex Mono', monospace;
font-size: 0.85rem;
font-weight: 400;
color: #e0e0e0;
line-height: 2;
word-spacing: 0.3em;
letter-spacing: 0.01em;
}
.seed {
font-size: 0.6rem;
color: #333;
text-align: center;
margin-top: 1.5rem;
letter-spacing: 0.15em;
animation: emerge 0.8s ease-out;
}
[data-testid="stButton"] > button {
background: transparent !important;
border: 1px solid #333 !important;
border-radius: 2px !important;
color: #888 !important;
font-family: 'IBM Plex Mono', monospace !important;
font-size: 0.7rem !important;
font-weight: 300 !important;
letter-spacing: 0.25em !important;
padding: 1rem 2rem !important;
transition: all 0.4s ease !important;
cursor: pointer !important;
}
[data-testid="stButton"] > button:hover {
background: transparent !important;
color: #e0e0e0 !important;
border-color: #555 !important;
}
[data-testid="stButton"] > button:active {
transform: scale(0.98) !important;
}
.stTabs [data-baseweb="tab-list"] {
justify-content: center;
gap: 2rem;
border-bottom: 1px solid #1a1a1a;
background: transparent;
}
.stTabs [data-baseweb="tab"] {
font-family: 'IBM Plex Mono', monospace;
font-size: 0.65rem;
font-weight: 300;
letter-spacing: 0.2em;
color: #444;
padding: 1rem 0;
background: transparent;
transition: color 0.3s ease;
}
.stTabs [aria-selected="true"] {
color: #888;
background: transparent;
}
.stTabs [data-baseweb="tab-highlight"] {
background-color: #444;
}
.divider {
border: none;
border-top: 1px solid #1a1a1a;
margin: 3rem 0;
}
.section {
margin: 2.5rem 0;
}
.section-title {
font-size: 0.65rem;
letter-spacing: 0.25em;
color: #444;
text-align: center;
margin-bottom: 1.5rem;
}
.spec-table {
width: 100%;
max-width: 320px;
margin: 0 auto;
font-size: 0.7rem;
border-collapse: collapse;
color: #777;
}
.spec-table td {
padding: 0.75rem 1rem;
border-bottom: 1px solid #151515;
}
.spec-table td:first-child {
color: #444;
text-align: right;
padding-right: 2rem;
}
.spec-table td:last-child {
text-align: left;
}
pre {
background-color: #0f0f0f !important;
border: 1px solid #1a1a1a !important;
border-radius: 2px !important;
}
code {
color: #666 !important;
font-size: 0.7rem !important;
}
/* Model selector styling */
.stSelectbox > div > div {
background-color: #0f0f0f !important;
border: 1px solid #222 !important;
border-radius: 2px !important;
color: #888 !important;
font-size: 0.7rem !important;
}
.stSelectbox > div > div:hover {
border-color: #333 !important;
}
.model-info {
font-size: 0.6rem;
color: #444;
text-align: center;
margin-top: 0.5rem;
letter-spacing: 0.1em;
}
</style>
"""