Files
Suanming-Web/public/styles.css
2026-01-08 17:40:59 +08:00

277 lines
4.3 KiB
CSS

:root {
color-scheme: light dark;
--bg: #0f1115;
--panel: #181b22;
--panel-light: #1f242f;
--text: #f8fbff;
--muted: #9ca3af;
--accent: #7c5dfa;
--accent-soft: rgba(124, 93, 250, 0.18);
--border: rgba(255, 255, 255, 0.08);
--success: #22c55e;
--error: #f87171;
font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
background-color: #0f1115;
}
body {
margin: 0;
min-height: 100vh;
background: var(--bg);
color: var(--text);
}
.page {
max-width: 1200px;
margin: 0 auto;
padding: 48px 20px 60px;
}
.hero {
text-align: center;
margin-bottom: 32px;
}
.hero h1 {
margin: 0;
font-size: clamp(2rem, 4vw, 3rem);
background: linear-gradient(120deg, var(--accent), #9f6bff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.layout {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 24px;
}
.panel {
background: linear-gradient(145deg, var(--panel), var(--panel-light));
border: 1px solid var(--border);
border-radius: 16px;
padding: 24px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.panel__header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
gap: 12px;
}
.panel__header h2 {
margin: 0;
}
.ghost {
background: transparent;
border: 1px solid var(--border);
color: var(--text);
border-radius: 999px;
padding: 6px 12px;
cursor: pointer;
transition: border 0.2s, color 0.2s;
}
.ghost:hover {
border-color: var(--accent);
color: var(--accent);
}
form {
display: flex;
flex-direction: column;
gap: 16px;
}
.grid {
display: grid;
gap: 12px;
}
@media (min-width: 768px) {
.grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
.field-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.field-group label {
font-weight: 600;
}
input,
select,
textarea {
padding: 10px 12px;
border-radius: 10px;
border: 1px solid transparent;
background: rgba(255, 255, 255, 0.05);
color: var(--text);
font-size: 1rem;
transition: border 0.2s, background 0.2s;
}
input:focus,
select:focus,
textarea:focus {
outline: none;
border-color: var(--accent);
background: rgba(255, 255, 255, 0.08);
}
textarea {
resize: vertical;
}
.field-group small {
color: var(--muted);
}
.checkbox {
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.checkbox label {
font-weight: 400;
display: flex;
align-items: center;
gap: 8px;
}
.form-actions {
display: flex;
align-items: center;
gap: 16px;
}
.form-actions button {
flex-shrink: 0;
}
button[type='submit'] {
background: linear-gradient(120deg, var(--accent), #9f6bff);
border: none;
padding: 12px 20px;
border-radius: 12px;
color: white;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: opacity 0.2s, transform 0.1s;
}
button[type='submit']:disabled {
opacity: 0.5;
cursor: not-allowed;
}
button[type='submit']:active {
transform: scale(0.99);
}
.hint {
margin: 0;
color: var(--muted);
}
.status {
padding: 4px 10px;
border-radius: 999px;
font-size: 0.85rem;
border: 1px solid transparent;
}
.status.idle {
border-color: var(--border);
color: var(--muted);
}
.status.info {
border-color: var(--accent);
color: var(--accent);
background: var(--accent-soft);
}
.status.success {
border-color: rgba(34, 197, 94, 0.5);
color: var(--success);
}
.status.error {
border-color: rgba(248, 113, 113, 0.4);
color: var(--error);
}
.ai-text {
min-height: 200px;
background: rgba(0, 0, 0, 0.2);
border-radius: 12px;
padding: 16px;
line-height: 1.6;
white-space: pre-wrap;
border: 1px dashed var(--border);
}
.ai-text .placeholder {
color: var(--muted);
}
.warnings {
margin-top: 16px;
padding: 12px;
border-radius: 12px;
border: 1px dashed rgba(248, 196, 113, 0.5);
color: #fbbf24;
background: rgba(251, 191, 36, 0.08);
}
.warnings.hidden {
display: none;
}
.footer {
margin-top: 40px;
text-align: center;
color: var(--muted);
}
.footer code {
color: var(--accent);
}
@media (max-width: 640px) {
.form-actions {
flex-direction: column;
align-items: stretch;
}
button[type='submit'] {
width: 100%;
}
}