Istihad's picture
Update static/style.css
e0e6b11 verified
Raw
History Blame Contribute Delete
9.1 kB
/* =========================================================================
Bangla Text Analyzer — editorial / warm-paper aesthetic
========================================================================= */
:root {
--paper: #f4efe6;
--paper-deep: #ebe3d5;
--ink: #1c1a17;
--ink-soft: #5b554c;
--accent: #c2410c; /* burnt orange */
--accent-deep: #9a3412;
--line: #d8cfbe;
--good: #3f6f4f;
--bad: #9a3412;
--neutral: #6b6457;
--radius: 14px;
--shadow: 0 24px 60px -28px rgba(40, 30, 15, 0.4);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
background:
radial-gradient(circle at 12% 8%, #fbf7ee 0%, transparent 45%),
radial-gradient(circle at 90% 95%, #efe6d6 0%, transparent 50%),
var(--paper);
color: var(--ink);
font-family: "Hind Siliguri", "Noto Serif Bengali", system-ui, sans-serif;
min-height: 100vh;
position: relative;
overflow-x: hidden;
}
/* subtle film-grain overlay for texture */
.grain {
position: fixed;
inset: 0;
pointer-events: none;
z-index: 0;
opacity: 0.04;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* ---------------- Masthead ---------------- */
.masthead {
position: relative;
z-index: 1;
display: flex;
align-items: center;
gap: 1.1rem;
padding: 2.4rem clamp(1.2rem, 5vw, 4rem) 1.4rem;
border-bottom: 1px solid var(--line);
}
.masthead__mark {
font-family: "Noto Serif Bengali", serif;
font-size: 2.5rem;
font-weight: 600;
width: 64px; height: 64px;
display: grid; place-items: center;
background: var(--ink);
color: var(--paper);
border-radius: 50%;
flex-shrink: 0;
}
.masthead h1 {
font-family: "Fraunces", serif;
font-weight: 900;
font-size: clamp(1.7rem, 4vw, 2.6rem);
letter-spacing: -0.02em;
margin: 0;
line-height: 1;
}
.masthead__sub {
margin: 0.45rem 0 0;
color: var(--ink-soft);
font-size: 0.92rem;
letter-spacing: 0.01em;
}
/* ---------------- Layout grid ---------------- */
.layout {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: 1fr 320px;
gap: 3.2rem;
padding: 1.8rem clamp(1.5rem, 6vw, 5rem) 2rem;
max-width: 1320px;
margin: 0 auto;
}
.panel {
background: rgba(255, 253, 248, 0.7);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 1.4rem;
backdrop-filter: blur(4px);
}
.panel--input { grid-column: 1; }
.panel--control {
grid-column: 2;
display: flex;
flex-direction: column;
box-shadow: var(--shadow);
}
.panel--output { grid-column: 1; }
/* ---------------- Labels ---------------- */
.field-label {
display: block;
font-family: "Fraunces", serif;
font-weight: 600;
font-size: 1.05rem;
margin-bottom: 0.8rem;
}
.field-label span {
font-family: "Hind Siliguri", sans-serif;
font-weight: 400;
font-size: 0.78rem;
color: var(--ink-soft);
margin-left: 0.4rem;
letter-spacing: 0.04em;
text-transform: uppercase;
}
/* ---------------- Text box + drop zone ---------------- */
.drop-zone {
position: relative;
border: 1.5px dashed var(--line);
border-radius: 10px;
transition: border-color 0.2s, background 0.2s;
}
.drop-zone.dragover {
border-color: var(--accent);
background: rgba(194, 65, 12, 0.05);
}
.drop-zone.dragover .drop-zone__overlay { opacity: 1; }
textarea#text-input {
width: 100%;
min-height: 260px;
resize: vertical;
border: none;
background: transparent;
padding: 1rem 1.1rem;
font-family: "Hind Siliguri", "Noto Serif Bengali", sans-serif;
font-size: 1.08rem;
line-height: 1.7;
color: var(--ink);
outline: none;
}
textarea#text-input::placeholder { color: #a89e8c; }
.drop-zone__overlay {
position: absolute;
inset: 0;
display: grid;
place-items: center;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s;
background: rgba(244, 239, 230, 0.85);
border-radius: 10px;
font-weight: 600;
color: var(--accent-deep);
}
.input-meta {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 0.9rem;
flex-wrap: wrap;
gap: 0.6rem;
}
#char-count { font-size: 0.82rem; color: var(--ink-soft); }
.file-row { display: flex; align-items: center; gap: 0.6rem; }
.file-name { font-size: 0.8rem; color: var(--accent-deep); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ghost-btn {
border: 1px solid var(--ink);
background: transparent;
color: var(--ink);
padding: 0.4rem 0.9rem;
border-radius: 999px;
font-family: inherit;
font-size: 0.82rem;
cursor: pointer;
transition: background 0.15s, color 0.15s;
}
.ghost-btn:hover { background: var(--ink); color: var(--paper); }
/* ---------------- Select ---------------- */
.select-wrap { position: relative; }
.select-wrap::after {
content: "▾";
position: absolute;
right: 1rem; top: 50%;
transform: translateY(-50%);
pointer-events: none;
color: var(--accent);
}
#task-select {
width: 100%;
appearance: none;
-webkit-appearance: none;
border: 1px solid var(--line);
border-radius: 10px;
background: var(--paper);
padding: 0.85rem 2.2rem 0.85rem 1rem;
font-family: inherit;
font-size: 0.98rem;
color: var(--ink);
cursor: pointer;
}
#task-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
/* ---------------- Run button ---------------- */
.run-btn {
margin-top: 1.1rem;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
border: none;
background: var(--accent);
color: #fff;
padding: 0.95rem 1.2rem;
border-radius: 10px;
font-family: "Fraunces", serif;
font-weight: 600;
font-size: 1.1rem;
cursor: pointer;
transition: transform 0.12s, background 0.2s;
}
.run-btn:hover { background: var(--accent-deep); transform: translateY(-2px); }
.run-btn:active { transform: translateY(0); }
.run-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.run-btn__arrow { font-family: sans-serif; opacity: 0.85; }
.hint { font-size: 0.78rem; color: var(--ink-soft); margin: 0.9rem 0 0; }
/* ---------------- Output ---------------- */
.output-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.output-head .field-label { margin: 0; }
.output-head__dot {
width: 10px; height: 10px; border-radius: 50%;
background: var(--line);
}
.output-head__dot.live { background: var(--accent); box-shadow: 0 0 0 4px rgba(194,65,12,0.15); }
.output-body { font-size: 1rem; line-height: 1.7; }
.output-body--empty { color: var(--ink-soft); font-style: italic; }
.result-card { animation: rise 0.4s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.result-card__top {
display: flex;
align-items: baseline;
gap: 0.9rem;
flex-wrap: wrap;
padding-bottom: 1rem;
border-bottom: 1px solid var(--line);
margin-bottom: 1rem;
}
.result-label {
font-family: "Fraunces", serif;
font-weight: 900;
font-size: clamp(1.6rem, 4vw, 2.3rem);
letter-spacing: -0.02em;
line-height: 1.05;
}
.result-label.is-good { color: var(--good); }
.result-label.is-bad { color: var(--bad); }
.result-task { color: var(--ink-soft); font-size: 0.9rem; }
.confidence { margin: 0.4rem 0 1.1rem; }
.confidence__bar {
height: 10px;
background: var(--paper-deep);
border-radius: 999px;
overflow: hidden;
}
.confidence__fill {
height: 100%;
background: linear-gradient(90deg, var(--accent), var(--accent-deep));
border-radius: 999px;
width: 0;
transition: width 0.7s cubic-bezier(.2,.8,.2,1);
}
.confidence__num { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.4rem; }
.details-grid { display: grid; gap: 0.5rem; margin-top: 0.4rem; }
.detail-row {
display: flex;
justify-content: space-between;
font-size: 0.9rem;
padding: 0.45rem 0.7rem;
background: var(--paper);
border: 1px solid var(--line);
border-radius: 8px;
}
.detail-row .k { color: var(--ink-soft); }
.detail-row .v { font-weight: 600; }
.error-box {
color: var(--bad);
background: rgba(154, 52, 18, 0.07);
border: 1px solid rgba(154, 52, 18, 0.3);
border-radius: 8px;
padding: 0.9rem 1.1rem;
}
.spinner {
display: inline-block;
width: 18px; height: 18px;
border: 2.5px solid var(--line);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.7s linear infinite;
vertical-align: middle;
margin-right: 0.6rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ---------------- Footer ---------------- */
.footer {
position: relative;
z-index: 1;
text-align: center;
padding: 1.6rem;
color: var(--ink-soft);
font-size: 0.8rem;
border-top: 1px solid var(--line);
}
/* ---------------- Responsive ---------------- */
@media (max-width: 820px) {
.layout { grid-template-columns: 1fr; }
.panel--input, .panel--control, .panel--output { grid-column: 1; }
}