From d6bd34aad2feb8ec8a3f5f0324bddeb74449450c Mon Sep 17 00:00:00 2001 From: mkelvers Date: Mon, 6 Apr 2026 19:20:56 +0200 Subject: [PATCH] ui: rewrite styles for new anime page layout and dark theme --- static/css/style.css | 875 +++++++++++++++++++++++++++++++------------ 1 file changed, 636 insertions(+), 239 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index e3f08d5..54079a4 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1,15 +1,16 @@ :root { - /* Minimalist, Clean Dark Palette */ - --bg: #0a0a0a; /* deep black background */ - --surface: #141414; /* dark grey surface */ - --surface-hover: #1f1f1f; /* slightly lighter surface for hover */ - --border: #262626; /* subtle border */ - --text: #f0f0f0; /* crisp white text */ - --text-muted: #a3a3a3; /* readable grey for secondary text */ - --accent: #e5e5e5; /* near-white for accents */ - --link: #a3a3a3; /* muted links */ - --link-hover: #ffffff; /* pure white on hover */ - --greentext: #4ade80; /* modern green */ + --bg: #0a0a0a; + --surface: #141414; + --surface-hover: #1f1f1f; + --border: #262626; + --text: #f0f0f0; + --text-muted: #737373; + --link: #a3a3a3; + --link-hover: #ffffff; +} + +* { + box-sizing: border-box; } body { @@ -22,144 +23,120 @@ body { padding: 0; min-height: 100vh; -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; } +/* Header */ header { - padding: 24px 32px; + padding: 0 32px; + height: 56px; border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 100; - display: flex; - flex-direction: column; - gap: 16px; } .header-top { display: flex; - justify-content: space-between; align-items: center; + height: 100%; + gap: 32px; } -h1 { - font-size: 20px; +.header-left { + display: flex; + align-items: center; + gap: 32px; +} + +.logo { + font-size: 16px; font-weight: 600; + color: var(--text); letter-spacing: -0.02em; - margin: 0; +} + +.logo:hover { color: var(--text); } .nav { - font-size: 13px; - font-weight: 500; display: flex; gap: 24px; - padding-left: 0; +} + +.nav a { + font-size: 13px; + font-weight: 500; + color: var(--text-muted); +} + +.nav a:hover { + color: var(--text); +} + +.header-search { + margin-left: auto; +} + +.search-input { + background: var(--surface); + border: 1px solid var(--border); + color: var(--text); + padding: 8px 12px; + font-size: 13px; + width: 240px; + font-family: inherit; +} + +.search-input:focus { + outline: none; + border-color: var(--text-muted); +} + +.search-input::placeholder { + color: var(--text-muted); +} + +/* Main */ +main { + padding: 32px; + max-width: 1200px; + margin: 0 auto; } a { color: var(--link); text-decoration: none; - transition: color 0.15s ease; } a:hover { color: var(--link-hover); } -.nav a { - text-transform: lowercase; - letter-spacing: 0.05em; -} - -hr { - display: none; -} - -main { - padding: 32px; - max-width: 1400px; - margin: 0 auto; -} - -/* Search Area */ -.search-input { - border: 1px solid var(--border); - background: var(--surface); - padding: 8px 12px; - color: var(--text); - font-size: 13px; - width: 280px; - transition: all 0.2s ease; - border-radius: 0; /* Strict no rounded corners */ -} - -.search-input:focus { - outline: none; - border-color: var(--text-muted); - background: var(--bg); -} - -.search-input::placeholder { - color: #525252; -} - -.search-button { - background-color: var(--text); - border: 1px solid var(--text); - color: var(--bg); - padding: 8px 16px; - cursor: pointer; - font-size: 13px; - font-weight: 600; - transition: all 0.15s ease; - border-radius: 0; -} - -.search-button:hover { - background-color: var(--link-hover); - border-color: var(--link-hover); -} - -.status-text { - color: var(--text-muted); - font-weight: 500; - font-size: 13px; - margin-bottom: 24px; - text-transform: lowercase; - text-align: left; -} - -/* Grid Layout */ +/* Grid */ .catalog-grid { display: grid; - grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); - gap: 32px 24px; + grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); + gap: 24px; } .catalog-item { display: flex; flex-direction: column; - gap: 12px; - text-align: left; - width: 100%; + gap: 8px; } -.image-container, .catalog-thumb { +.catalog-thumb { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: var(--surface); border: 1px solid var(--border); - transition: transform 0.3s ease, opacity 0.3s ease; - display: block; } -.image-container:hover, .catalog-thumb:hover { - transform: scale(1.02); - opacity: 0.9; +.catalog-thumb:hover { + opacity: 0.8; } .no-image { @@ -168,19 +145,15 @@ main { display: flex; align-items: center; justify-content: center; - color: #525252; + color: var(--text-muted); font-size: 12px; - text-transform: uppercase; - letter-spacing: 0.1em; background: var(--surface); border: 1px solid var(--border); } .catalog-title { + font-size: 13px; font-weight: 500; - font-size: 14px; - margin: 0; - line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; @@ -188,196 +161,620 @@ main { overflow: hidden; } -footer { - text-align: center; - font-size: 12px; +/* Loading */ +.loading-indicator { + display: flex; + align-items: center; + gap: 8px; color: var(--text-muted); - margin-top: 64px; - padding: 32px; - border-top: 1px solid var(--border); + font-size: 13px; +} + +.loading-dot { + width: 4px; + height: 4px; + background: var(--text-muted); + animation: pulse 1.5s ease-in-out infinite; +} + +.loading-dot:nth-child(2) { animation-delay: 0.2s; } +.loading-dot:nth-child(3) { animation-delay: 0.4s; } + +@keyframes pulse { + 0%, 100% { opacity: 0.3; } + 50% { opacity: 1; } } -/* HTMX states */ .htmx-indicator { display: none; } -.htmx-request .htmx-indicator { display: block; } -.htmx-request.htmx-indicator { display: block; } +.htmx-request .htmx-indicator { display: flex; } -/* Anime Details Page */ -.details-container { - display: grid; - grid-template-columns: 300px 1fr; - gap: 48px; - align-items: start; +/* Empty State */ +.empty-state { + text-align: center; + padding: 64px 32px; } -.details-header { - grid-column: 1 / -1; - margin-bottom: 16px; - border: none; +.empty-state-title { + font-size: 16px; + font-weight: 500; + color: var(--text); + margin-bottom: 8px; } -.details-header h2 { - font-size: 32px; +.empty-state-text { + font-size: 14px; + color: var(--text-muted); +} + +.empty-state a { + color: var(--text); + text-decoration: underline; +} + +/* Login */ +.login-container { + max-width: 320px; + margin: 80px auto; +} + +.login-container h2 { + font-size: 20px; font-weight: 600; - letter-spacing: -0.02em; margin: 0 0 8px 0; } -.details-subtitle { - font-size: 15px; +.login-subtitle { color: var(--text-muted); + font-size: 14px; + margin: 0 0 32px 0; } -.details-sidebar { +.login-form { display: flex; flex-direction: column; - gap: 24px; - width: 100%; + gap: 16px; } -.details-image { - width: 100%; - height: auto; - border: 1px solid var(--border); - display: block; +.form-group { + display: flex; + flex-direction: column; + gap: 6px; } -.stats-table { - width: 100%; - border-collapse: collapse; +.form-group label { font-size: 13px; - border: 1px solid var(--border); + color: var(--text-muted); } -.stats-table td { - border-bottom: 1px solid var(--border); +.form-group input { padding: 10px 12px; - border-right: none; - border-left: none; -} - -.stats-table tr:last-child td { - border-bottom: none; -} - -.stats-table .stat-label { - color: var(--text-muted); - width: 100px; - font-weight: 500; - background: transparent; -} - -.stat-sub { - color: #525252; - font-size: 12px; - display: block; - margin-top: 2px; -} - -.details-main { - display: flex; - flex-direction: column; - gap: 32px; -} - -.details-main h3 { - font-size: 14px; - text-transform: uppercase; - letter-spacing: 0.1em; - color: var(--text-muted); - margin: 0 0 16px 0; - font-weight: 600; - border-bottom: 1px solid var(--border); - padding-bottom: 8px; - display: block; -} - -.details-synopsis { - font-size: 15px; - line-height: 1.8; - color: var(--text); - white-space: pre-wrap; -} - -.relations-list ul { - list-style-type: none; - padding: 0; - margin: 0; - display: flex; - flex-direction: column; - gap: 12px; -} - -.relations-list li { - font-size: 14px; - display: flex; - gap: 8px; - align-items: baseline; -} - -.relations-list strong { - color: var(--text-muted); - font-weight: 500; - font-size: 12px; - text-transform: uppercase; - letter-spacing: 0.05em; - min-width: 80px; -} - -/* Forms & Selects */ -select, input[type="text"], input[type="password"], input[type="email"] { background: var(--surface); border: 1px solid var(--border); color: var(--text); - padding: 8px 12px; - font-size: 13px; + font-size: 14px; font-family: inherit; - border-radius: 0; - transition: all 0.2s ease; } -select:focus, input:focus { +.form-group input:focus { outline: none; border-color: var(--text-muted); - background: var(--bg); } -button { - border-radius: 0; +.login-button { + padding: 10px; + background: var(--text); + color: var(--bg); + border: none; + font-size: 14px; + font-weight: 500; + cursor: pointer; + margin-top: 8px; + font-family: inherit; +} + +.login-button:hover { + background: var(--link-hover); +} + +/* Watchlist */ +.watchlist-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 24px; +} + +.watchlist-header h2 { + font-size: 20px; + font-weight: 600; + margin: 0; +} + +.view-toggle { + display: flex; + border: 1px solid var(--border); +} + +.view-toggle a { + padding: 6px 12px; + font-size: 13px; + color: var(--text-muted); +} + +.view-toggle a:hover { + color: var(--text); + background: var(--surface); +} + +.view-toggle a.active { + color: var(--bg); + background: var(--text); +} + +.status-tabs { + display: flex; + gap: 0; + margin-bottom: 24px; + border-bottom: 1px solid var(--border); + overflow-x: auto; +} + +.status-tabs a { + padding: 12px 16px; + font-size: 13px; + color: var(--text-muted); + white-space: nowrap; + border-bottom: 2px solid transparent; + margin-bottom: -1px; +} + +.status-tabs a:hover { + color: var(--text); +} + +.status-tabs a.active { + color: var(--text); + border-bottom-color: var(--text); +} + +.watchlist-item { + position: relative; +} + +.watchlist-item .remove-btn { + position: absolute; + top: 8px; + right: 8px; + width: 24px; + height: 24px; + display: flex; + align-items: center; + justify-content: center; + background: rgba(0, 0, 0, 0.8); + border: 1px solid var(--border); + color: var(--text-muted); + cursor: pointer; + font-size: 14px; + opacity: 0; + transition: opacity 0.15s; +} + +.watchlist-item:hover .remove-btn { + opacity: 1; +} + +.watchlist-item .remove-btn:hover { + color: #ef4444; + border-color: #ef4444; +} + +.watchlist-status { + font-size: 12px; + color: var(--text-muted); +} + +.watchlist-table { + width: 100%; + border-collapse: collapse; +} + +.watchlist-table th { + text-align: left; + padding: 12px 16px; + font-size: 12px; + font-weight: 500; + color: var(--text-muted); + border-bottom: 1px solid var(--border); +} + +.watchlist-table td { + padding: 12px 16px; + border-bottom: 1px solid var(--border); + vertical-align: middle; +} + +.watchlist-table tr:hover { + background: var(--surface); +} + +.watchlist-table .thumb { + width: 40px; + height: 60px; + object-fit: cover; + border: 1px solid var(--border); +} + +.watchlist-table .title-cell { + font-weight: 500; +} + +.watchlist-table .status-cell { + color: var(--text-muted); +} + +.watchlist-table .remove-link { + color: var(--text-muted); + font-size: 13px; + background: none; + border: none; + cursor: pointer; + font-family: inherit; +} + +.watchlist-table .remove-link:hover { + color: #ef4444; +} + +/* Anime Page */ +.anime-page { + display: flex; + gap: 40px; + max-width: 1100px; +} + +.anime-main { + flex: 1; + min-width: 0; +} + +.anime-hero { + display: flex; + gap: 24px; + margin-bottom: 32px; +} + +.anime-poster { + flex-shrink: 0; + width: 180px; +} + +.anime-poster img { + width: 100%; + border: 1px solid var(--border); +} + +.anime-info { + flex: 1; + min-width: 0; +} + +.anime-info h1 { + font-size: 24px; + font-weight: 600; + margin: 0 0 4px 0; + letter-spacing: -0.02em; +} + +.anime-alt-title { + font-size: 14px; + color: var(--text-muted); + margin: 0 0 16px 0; +} + +.anime-quick-info { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-bottom: 16px; +} + +.info-tag { + padding: 4px 10px; + background: var(--surface); + border: 1px solid var(--border); + font-size: 12px; + font-weight: 500; + color: var(--text-muted); +} + +.anime-actions { + margin-top: 16px; +} + +.anime-synopsis { + margin-bottom: 32px; +} + +.anime-synopsis h3, +.anime-relations h3 { + font-size: 12px; + font-weight: 600; + color: var(--text-muted); + text-transform: uppercase; + letter-spacing: 0.05em; + margin: 0 0 12px 0; +} + +.anime-synopsis p { + font-size: 14px; + line-height: 1.7; + color: var(--text); + margin: 0; +} + +.anime-synopsis .no-synopsis { + color: var(--text-muted); +} + +/* Relations Grid */ +.relations-grid { + display: grid; + grid-template-columns: repeat(6, 1fr); + gap: 16px; +} + +.relation-card { + display: flex; + flex-direction: column; + gap: 8px; +} + +.relation-card.current { + position: relative; +} + +.relation-card.current::before { + content: ''; + position: absolute; + inset: -4px; + border: 2px solid var(--text); + pointer-events: none; +} + +.relation-thumb { + width: 100%; + aspect-ratio: 2/3; + object-fit: cover; + border: 1px solid var(--border); +} + +.relation-card:hover .relation-thumb { + opacity: 0.8; +} + +.relation-title { + font-size: 12px; + font-weight: 500; + color: var(--text); + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* Anime Sidebar */ +.anime-sidebar { + flex-shrink: 0; + width: 280px; + display: flex; + flex-direction: column; + gap: 12px; + padding: 20px; + background: var(--surface); + border: 1px solid var(--border); + height: fit-content; +} + +.sidebar-row { + display: flex; + flex-direction: column; + gap: 4px; +} + +.sidebar-label { + font-size: 13px; + font-weight: 600; + color: var(--text); +} + +.sidebar-value { + font-size: 13px; + color: var(--text-muted); + line-height: 1.4; +} + +.sidebar-row-wrap { + gap: 8px; +} + +.sidebar-tags { + display: flex; + flex-wrap: wrap; + gap: 6px; +} + +.sidebar-tag { + padding: 4px 10px; + background: var(--surface-hover); + border: 1px solid var(--border); + font-size: 12px; + color: var(--text); +} + +/* Dropdown */ +.dropdown { + position: relative; + display: inline-block; +} + +.dropdown-trigger { + display: flex; + align-items: center; + gap: 8px; + padding: 10px 16px; + background: var(--surface); + border: 1px solid var(--border); + color: var(--text); + font-size: 14px; + font-family: inherit; + cursor: pointer; +} + +.dropdown-trigger:hover { + border-color: var(--text-muted); +} + +.dropdown-arrow { + font-size: 10px; + color: var(--text-muted); +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + right: 0; + min-width: 180px; + background: var(--surface); + border: 1px solid var(--border); + display: none; + z-index: 50; +} + +.dropdown.open .dropdown-menu { + display: block; +} + +.dropdown-item { + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + padding: 10px 16px; + background: none; + border: none; + color: var(--text); + font-size: 14px; + font-family: inherit; + cursor: pointer; + text-align: left; +} + +.dropdown-item:hover { + background: var(--surface-hover); +} + +.dropdown-item.active { + color: var(--text); +} + +.dropdown-item .check { + color: var(--text-muted); + font-size: 12px; +} + +.dropdown-item.remove { + color: #ef4444; +} + +.dropdown-divider { + height: 1px; + background: var(--border); + margin: 4px 0; +} + +/* Toast */ +#toast-container { + position: fixed; + bottom: 24px; + right: 24px; + z-index: 1000; + display: flex; + flex-direction: column; + gap: 8px; +} + +.toast { + background: var(--surface); + border: 1px solid var(--border); + color: var(--text); + padding: 12px 16px; + font-size: 13px; + opacity: 0; + transition: opacity 0.2s; +} + +/* Responsive */ +@media (max-width: 900px) { + .anime-page { + flex-direction: column; + } + + .anime-sidebar { + width: 100%; + order: 2; + } + + .relations-grid { + grid-template-columns: repeat(4, 1fr); + } } -/* Responsive adjustments */ @media (max-width: 768px) { header { - padding: 16px; + padding: 0 16px; } - + .header-top { - flex-direction: column; - align-items: flex-start; + flex-wrap: wrap; + height: auto; + padding: 16px 0; gap: 16px; } - form[action="/"] { + .header-search { width: 100%; + margin-left: 0; } .search-input { width: 100%; - flex: 1; } main { padding: 16px; } - .details-container { - grid-template-columns: 1fr; - gap: 32px; - } - .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); - gap: 24px 16px; + gap: 16px; } -} \ No newline at end of file + + .anime-hero { + flex-direction: column; + gap: 16px; + } + + .anime-poster { + width: 140px; + } + + .anime-info h1 { + font-size: 20px; + } + + .relations-grid { + grid-template-columns: repeat(3, 1fr); + gap: 12px; + } +}