Files
FlowReader/web/src/App.css
T

552 lines
9.2 KiB
CSS

:root {
--primary: #6366f1;
--primary-hover: #4f46e5;
--background: #0f172a;
--surface: #1e293b;
--surface-hover: #334155;
--text: #f8fafc;
--text-muted: #94a3b8;
--error: #ef4444;
--success: #22c55e;
--border: #334155;
--radius: 12px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--background);
color: var(--text);
min-height: 100vh;
}
/* Login/Register Container */
.login-container {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
background: linear-gradient(135deg, var(--background) 0%, #1a1a2e 100%);
}
.login-card {
background: var(--surface);
border-radius: var(--radius);
padding: 2.5rem;
width: 100%;
max-width: 400px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.login-card h1 {
font-size: 2rem;
font-weight: 700;
text-align: center;
background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
}
.login-card .subtitle {
text-align: center;
color: var(--text-muted);
margin-bottom: 2rem;
}
/* Form Styles */
.form-group {
margin-bottom: 1.25rem;
}
.form-group label {
display: block;
font-size: 0.875rem;
font-weight: 500;
color: var(--text-muted);
margin-bottom: 0.5rem;
}
.form-group input {
width: 100%;
padding: 0.875rem 1rem;
background: var(--background);
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text);
font-size: 1rem;
transition: all 0.2s ease;
}
.form-group input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.form-group input::placeholder {
color: var(--text-muted);
}
button[type="submit"] {
width: 100%;
padding: 0.875rem;
background: var(--primary);
border: none;
border-radius: 8px;
color: white;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
margin-top: 0.5rem;
}
button[type="submit"]:hover:not(:disabled) {
background: var(--primary-hover);
transform: translateY(-1px);
}
button[type="submit"]:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.error-message {
background: rgba(239, 68, 68, 0.1);
border: 1px solid var(--error);
color: var(--error);
padding: 0.75rem;
border-radius: 8px;
margin-bottom: 1rem;
font-size: 0.875rem;
}
.register-link {
text-align: center;
margin-top: 1.5rem;
color: var(--text-muted);
font-size: 0.875rem;
}
.register-link a {
color: var(--primary);
text-decoration: none;
font-weight: 500;
}
.register-link a:hover {
text-decoration: underline;
}
/* Dashboard Layout */
.dashboard-layout {
display: flex;
height: 100vh;
overflow: hidden;
}
.sidebar {
width: 280px;
background: var(--surface);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
}
.sidebar-nav {
flex: 1;
padding: 1rem;
overflow-y: auto;
}
.nav-item {
width: 100%;
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1rem;
background: transparent;
border: none;
border-radius: 8px;
color: var(--text-muted);
font-size: 0.9375rem;
cursor: pointer;
transition: all 0.2s ease;
margin-bottom: 0.25rem;
text-align: left;
}
.nav-item:hover {
background: var(--surface-hover);
color: var(--text);
}
.nav-item.active {
background: rgba(99, 102, 241, 0.1);
color: var(--primary);
font-weight: 500;
}
.nav-item .icon {
font-size: 1.125rem;
}
.nav-item .label {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.nav-item .badge {
background: var(--primary);
color: white;
font-size: 0.75rem;
padding: 0.125rem 0.5rem;
border-radius: 10px;
font-weight: 600;
}
.sidebar-section {
margin-top: 2rem;
}
.sidebar-section h3 {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
padding: 0 1rem;
margin-bottom: 0.75rem;
}
.sidebar-footer {
padding: 1rem;
border-top: 1px solid var(--border);
}
.add-feed-btn {
width: 100%;
padding: 0.75rem;
background: transparent;
border: 1px dashed var(--border);
border-radius: 8px;
color: var(--text-muted);
cursor: pointer;
transition: all 0.2s ease;
}
.add-feed-btn:hover {
border-color: var(--primary);
color: var(--primary);
}
.dashboard-header {
padding: 1rem 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--border);
background: var(--surface);
}
.header-actions {
display: flex;
align-items: center;
gap: 1.5rem;
}
.mark-all-read-btn {
background: transparent;
border: 1px solid var(--primary);
color: var(--primary);
padding: 0.5rem 1rem;
border-radius: 6px;
cursor: pointer;
font-size: 0.875rem;
font-weight: 500;
transition: all 0.2s ease;
}
.mark-all-read-btn:hover:not(:disabled) {
background: var(--primary);
color: white;
}
.mark-all-read-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.user-info {
display: flex;
align-items: center;
gap: 1rem;
}
.articles-main {
flex: 1;
overflow-y: auto;
padding: 2rem;
}
.articles-grid {
max-width: 800px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 1.5rem;
}
/* Article Card */
.article-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.5rem;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
}
.article-card:hover {
border-color: var(--primary);
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
.article-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.75rem;
font-size: 0.75rem;
color: var(--text-muted);
}
.feed-title {
font-weight: 600;
color: var(--primary);
}
.article-title {
font-size: 1.25rem;
font-weight: 600;
margin-bottom: 0.75rem;
line-height: 1.4;
}
.article-excerpt {
color: var(--text-muted);
font-size: 0.9375rem;
line-height: 1.6;
margin-bottom: 1.25rem;
}
.article-footer {
display: flex;
gap: 1rem;
}
.action-btn {
background: transparent;
border: 1px solid var(--border);
color: var(--text-muted);
padding: 0.375rem 0.75rem;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
font-size: 1rem;
}
.action-btn:hover {
background: var(--surface-hover);
color: var(--text);
}
.action-btn.active {
color: #fbbf24;
border-color: #fbbf24;
}
/* Reader View Overlay */
.reader-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.85);
display: flex;
justify-content: flex-end;
z-index: 1000;
backdrop-filter: blur(4px);
}
.reader-container {
width: 100%;
max-width: 800px;
background: var(--background);
height: 100%;
display: flex;
flex-direction: column;
animation: slideIn 0.3s ease-out;
box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}
@keyframes slideIn {
from {
transform: translateX(100%);
}
to {
transform: translateX(0);
}
}
.reader-header {
padding: 1rem 2rem;
border-bottom: 1px solid var(--border);
display: flex;
justify-content: space-between;
align-items: center;
background: var(--surface);
}
.close-btn {
background: transparent;
border: none;
color: var(--text);
font-size: 1rem;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.5rem;
}
.reader-actions {
display: flex;
gap: 1rem;
}
.reader-content {
flex: 1;
overflow-y: auto;
padding: 3rem 4rem;
line-height: 1.6;
}
.reader-content .meta {
display: flex;
gap: 1rem;
font-size: 0.875rem;
color: var(--text-muted);
margin-bottom: 1.5rem;
}
.reader-content .title {
font-size: 2.5rem;
font-weight: 800;
margin-bottom: 1rem;
line-height: 1.2;
}
.reader-content .author {
color: var(--text-muted);
font-style: italic;
margin-bottom: 2rem;
}
.content-body {
font-size: 1.125rem;
color: #e2e8f0;
}
.content-body p {
margin-bottom: 1.5rem;
}
.content-body img {
max-width: 100%;
height: auto;
border-radius: 8px;
margin: 1.5rem 0;
}
.content-body a {
color: var(--primary);
text-decoration: underline;
}
.content-body h1,
.content-body h2,
.content-body h3 {
margin-top: 2rem;
margin-bottom: 1rem;
}
/* Loading/Empty States */
.loading-state {
display: flex;
justify-content: center;
padding: 4rem;
}
/* Mobile Adjustments */
@media (max-width: 768px) {
.sidebar {
display: none;
}
.reader-content {
padding: 2rem 1.5rem;
}
.reader-content .title {
font-size: 1.75rem;
}
}
/* Loading */
.loading-screen {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1rem;
}
.spinner {
width: 40px;
height: 40px;
border: 3px solid var(--border);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Mobile First */
@media (max-width: 480px) {
.login-card {
padding: 1.5rem;
}
.login-card h1 {
font-size: 1.5rem;
}
}