KittenTTS-WebGPU / src /index.css
shreyask's picture
Upload folder using huggingface_hub
92754e9 verified
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--bg: #111;
--surface: #1a1a1a;
--surface-2: #222;
--border: #333;
--text: #e5e5e5;
--text-muted: #888;
--accent: #c084fc;
--accent-dim: rgba(192, 132, 252, 0.15);
--radius: 8px;
--font: system-ui, -apple-system, "Segoe UI", sans-serif;
--mono: ui-monospace, "SF Mono", Consolas, monospace;
}
html {
color-scheme: dark;
}
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
.container {
max-width: 720px;
margin: 0 auto;
padding: 2rem 1.5rem;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header */
header {
text-align: center;
margin-bottom: 2rem;
position: relative;
}
header h1 {
font-size: 1.75rem;
font-weight: 600;
letter-spacing: -0.02em;
margin-bottom: 0.25rem;
}
.title-link {
color: var(--text) !important;
text-decoration: none !important;
}
.title-link:hover {
opacity: 0.8;
}
.logo {
font-size: 1.5rem;
}
.subtitle {
color: var(--text-muted);
font-size: 0.9rem;
}
.badge {
display: inline-block;
margin-top: 0.5rem;
padding: 0.15rem 0.6rem;
border-radius: 999px;
font-size: 0.7rem;
font-weight: 600;
font-family: var(--mono);
letter-spacing: 0.05em;
}
.badge-gpu {
background: rgba(74, 222, 128, 0.15);
color: #4ade80;
border: 1px solid rgba(74, 222, 128, 0.3);
}
.badge-wasm {
background: rgba(251, 191, 36, 0.15);
color: #fbbf24;
border: 1px solid rgba(251, 191, 36, 0.3);
}
/* Main */
main {
flex: 1;
display: flex;
flex-direction: column;
gap: 1.5rem;
}
label {
display: block;
font-size: 0.8rem;
font-weight: 500;
color: var(--text-muted);
margin-bottom: 0.4rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
textarea {
width: 100%;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text);
font-family: var(--font);
font-size: 0.95rem;
padding: 0.75rem;
resize: vertical;
outline: none;
transition: border-color 0.15s;
}
textarea:focus {
border-color: var(--accent);
}
textarea::placeholder {
color: #555;
}
/* Controls */
.controls-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
margin-top: 0.75rem;
}
select {
width: 100%;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text);
font-family: var(--font);
font-size: 0.9rem;
padding: 0.5rem 0.75rem;
outline: none;
cursor: pointer;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.75rem center;
padding-right: 2rem;
}
select:focus {
border-color: var(--accent);
}
select:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.speed-row {
margin-top: 0.75rem;
}
.speed-row label {
font-family: var(--mono);
font-size: 0.75rem;
}
input[type="range"] {
width: 100%;
accent-color: var(--accent);
height: 4px;
cursor: pointer;
}
/* Generate button */
.generate-btn {
margin-top: 1rem;
width: 100%;
padding: 0.7rem 1.5rem;
background: var(--accent);
color: #111;
border: none;
border-radius: var(--radius);
font-family: var(--font);
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: opacity 0.15s;
}
.generate-btn:hover:not(:disabled) {
opacity: 0.9;
}
.generate-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
/* Output */
.output-section {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1rem;
}
/* Waveform player */
.waveform-player {
display: flex;
align-items: center;
gap: 0.75rem;
}
.waveform-play {
flex-shrink: 0;
width: 36px;
height: 36px;
border-radius: 50%;
border: none;
background: var(--accent);
color: #111;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.15s;
}
.waveform-play:hover {
opacity: 0.85;
}
.waveform-canvas {
flex: 1;
height: 48px;
cursor: pointer;
border-radius: 4px;
}
.waveform-time {
flex-shrink: 0;
font-family: var(--mono);
font-size: 0.7rem;
color: var(--text-muted);
min-width: 5.5em;
text-align: right;
}
.waveform-gen-time {
flex-shrink: 0;
font-family: var(--mono);
font-size: 0.65rem;
color: #555;
padding: 0.15rem 0.4rem;
background: var(--surface-2);
border-radius: 4px;
}
.audio-placeholder {
padding: 2rem 1rem;
text-align: center;
color: #555;
font-size: 0.85rem;
}
/* Examples */
.examples-grid {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.example-btn {
display: flex;
align-items: baseline;
gap: 0.75rem;
width: 100%;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 0.6rem 0.75rem;
color: var(--text);
font-family: var(--font);
font-size: 0.85rem;
cursor: pointer;
text-align: left;
transition: border-color 0.15s;
}
.example-btn:hover:not(:disabled) {
border-color: var(--accent);
}
.example-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.example-voice {
flex-shrink: 0;
font-family: var(--mono);
font-size: 0.75rem;
font-weight: 600;
color: var(--accent);
padding: 0.1rem 0.4rem;
background: var(--accent-dim);
border-radius: 4px;
}
.example-text {
color: var(--text-muted);
flex: 1;
}
.example-meta {
flex-shrink: 0;
font-family: var(--mono);
font-size: 0.7rem;
color: #555;
}
/* Error */
.error-msg {
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.3);
color: #f87171;
border-radius: var(--radius);
padding: 0.75rem 1rem;
font-size: 0.85rem;
}
/* Footer */
footer {
margin-top: 2.5rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border);
text-align: center;
font-size: 0.75rem;
color: var(--text-muted);
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.footer-note {
font-style: italic;
margin-bottom: 0.5rem;
}
footer a {
color: var(--text-muted);
text-decoration: underline;
text-underline-offset: 2px;
transition: color 0.15s;
}
footer a:hover {
color: var(--text);
}
/* Responsive */
@media (max-width: 480px) {
.container {
padding: 1.25rem 1rem;
}
.controls-row {
grid-template-columns: 1fr;
}
header h1 {
font-size: 1.5rem;
}
}