racing-analysis / static /css /main.css
matias-cataife's picture
Upload static/css/main.css with huggingface_hub
b49486a verified
/* ===============================
RACING ANALYTICS - MAIN STYLES
Base styles, variables, and sidebar
=============================== */
:root {
--green-vibrant: #48BF5F;
--green-dark: #228B22;
--green-light: #e8f5e9;
--green-glow: rgba(72, 191, 95, 0.15);
--orange: #f59e0b;
--orange-light: #fef3c7;
--white: #ffffff;
--gray-50: #f9fafb;
--gray-100: #f3f4f6;
--gray-200: #e5e7eb;
--gray-300: #d1d5db;
--gray-500: #6b7280;
--gray-700: #374151;
--gray-900: #111827;
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 20px 40px -15px rgba(34, 139, 34, 0.15);
/* Sidebar variables */
--sidebar-width: 260px;
--sidebar-collapsed-width: 70px;
--sidebar-bg: #1a1f2e;
--sidebar-hover: #252b3d;
--sidebar-active: linear-gradient(135deg, var(--green-dark) 0%, var(--green-vibrant) 100%);
--transition-speed: 0.3s;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
background: var(--gray-50);
color: var(--gray-900);
min-height: 100vh;
line-height: 1.6;
}
/* ===============================
APP LAYOUT
=============================== */
.app-container {
display: flex;
min-height: 100vh;
}
/* ===============================
SIDEBAR
=============================== */
.sidebar {
width: var(--sidebar-width);
background: var(--sidebar-bg);
min-height: 100vh;
position: fixed;
left: 0;
top: 0;
z-index: 100;
display: flex;
flex-direction: column;
transition: width var(--transition-speed) ease;
box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}
.sidebar.collapsed {
width: var(--sidebar-collapsed-width);
}
/* Sidebar Header */
.sidebar-header {
padding: 1.5rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
align-items: center;
gap: 1rem;
min-height: 80px;
}
.sidebar-logo {
width: 44px;
height: 44px;
background: var(--white);
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
padding: 4px;
flex-shrink: 0;
}
.sidebar-logo img {
width: 100%;
height: 100%;
object-fit: contain;
}
.sidebar-brand {
overflow: hidden;
white-space: nowrap;
transition: opacity var(--transition-speed) ease;
}
.sidebar.collapsed .sidebar-brand {
opacity: 0;
width: 0;
}
.sidebar-brand h1 {
color: var(--white);
font-size: 1.1rem;
font-weight: 700;
letter-spacing: -0.02em;
}
.sidebar-brand p {
color: rgba(255, 255, 255, 0.6);
font-size: 0.75rem;
}
/* Sidebar Navigation */
.sidebar-nav {
flex: 1;
padding: 1rem 0;
overflow-y: auto;
}
.nav-section {
margin-bottom: 1.5rem;
}
.nav-section-title {
color: rgba(255, 255, 255, 0.4);
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1em;
padding: 0.5rem 1.5rem;
overflow: hidden;
white-space: nowrap;
transition: opacity var(--transition-speed) ease;
}
.sidebar.collapsed .nav-section-title {
opacity: 0;
}
.nav-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.875rem 1.5rem;
color: rgba(255, 255, 255, 0.7);
text-decoration: none;
cursor: pointer;
transition: all 0.2s ease;
border-left: 3px solid transparent;
position: relative;
}
.nav-item:hover {
background: var(--sidebar-hover);
color: var(--white);
}
.nav-item.active {
background: var(--sidebar-active);
color: var(--white);
border-left-color: var(--green-vibrant);
}
.nav-item-icon {
font-size: 1.25rem;
width: 28px;
text-align: center;
flex-shrink: 0;
}
.nav-item-text {
font-size: 0.9rem;
font-weight: 500;
overflow: hidden;
white-space: nowrap;
transition: opacity var(--transition-speed) ease;
}
.sidebar.collapsed .nav-item-text {
opacity: 0;
width: 0;
}
.nav-item-badge {
margin-left: auto;
font-size: 0.65rem;
background: var(--orange);
color: var(--white);
padding: 0.15rem 0.5rem;
border-radius: 10px;
font-weight: 600;
transition: opacity var(--transition-speed) ease;
}
.sidebar.collapsed .nav-item-badge {
position: absolute;
top: 0.5rem;
right: 0.5rem;
padding: 0.1rem 0.3rem;
}
/* Sidebar Toggle */
.sidebar-toggle {
position: absolute;
top: 1.5rem;
right: -14px;
width: 28px;
height: 28px;
background: var(--sidebar-bg);
border: 2px solid var(--gray-200);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: var(--white);
font-size: 0.9rem;
transition: all 0.2s ease;
z-index: 10;
}
.sidebar-toggle:hover {
background: var(--green-vibrant);
border-color: var(--green-vibrant);
transform: scale(1.1);
}
.sidebar.collapsed .sidebar-toggle {
transform: rotate(180deg);
}
.sidebar.collapsed .sidebar-toggle:hover {
transform: rotate(180deg) scale(1.1);
}
/* Sidebar Footer */
.sidebar-footer {
padding: 1rem 1.5rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-footer-text {
color: rgba(255, 255, 255, 0.4);
font-size: 0.7rem;
text-align: center;
overflow: hidden;
white-space: nowrap;
transition: opacity var(--transition-speed) ease;
}
.sidebar.collapsed .sidebar-footer-text {
opacity: 0;
}
/* ===============================
MAIN CONTENT
=============================== */
.main-content {
flex: 1;
margin-left: var(--sidebar-width);
transition: margin-left var(--transition-speed) ease;
min-height: 100vh;
}
.sidebar.collapsed ~ .main-content {
margin-left: var(--sidebar-collapsed-width);
}
/* Content Header */
.content-header {
background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-vibrant) 100%);
padding: 1.5rem 2rem;
position: relative;
overflow: hidden;
}
.content-header::before {
content: '';
position: absolute;
top: -50%;
right: -10%;
width: 300px;
height: 300px;
background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
border-radius: 50%;
}
.content-header-inner {
position: relative;
z-index: 1;
}
.content-header h1 {
color: var(--white);
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 0.25rem;
}
.content-header p {
color: rgba(255, 255, 255, 0.8);
font-size: 0.9rem;
}
/* Content Body */
.content-body {
padding: 2rem;
max-width: 1400px;
}
/* Section Wrapper */
.section-wrapper {
display: none;
}
.section-wrapper.active {
display: block;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
/* ===============================
COMMON COMPONENTS
=============================== */
/* Cards */
.card {
background: var(--white);
border: 1px solid var(--gray-200);
border-radius: 16px;
padding: 1.5rem;
box-shadow: var(--shadow);
}
.card-title {
font-size: 1.125rem;
font-weight: 600;
color: var(--gray-900);
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.card-title::before {
content: '';
width: 4px;
height: 20px;
background: var(--green-vibrant);
border-radius: 2px;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 10px;
font-size: 1rem;
font-weight: 600;
font-family: inherit;
cursor: pointer;
transition: all 0.2s ease;
}
.btn-primary {
background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-vibrant) 100%);
color: var(--white);
box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(34, 139, 34, 0.4);
}
.btn-primary:disabled {
opacity: 0.7;
cursor: not-allowed;
transform: none;
}
.btn-secondary {
background: var(--gray-100);
color: var(--gray-700);
border: 2px solid var(--gray-200);
}
.btn-secondary:hover {
background: var(--gray-200);
}
/* Form Elements */
.form-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.form-group label {
font-size: 0.875rem;
font-weight: 500;
color: var(--gray-700);
}
.form-group select,
.form-group input {
padding: 0.75rem 1rem;
border: 2px solid var(--gray-200);
border-radius: 10px;
font-size: 1rem;
font-family: inherit;
background: var(--white);
color: var(--gray-900);
transition: all 0.2s ease;
}
.form-group select:focus,
.form-group input:focus {
outline: none;
border-color: var(--green-vibrant);
box-shadow: 0 0 0 4px var(--green-glow);
}
.form-group select {
cursor: pointer;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.75rem center;
background-size: 1.25rem;
padding-right: 2.5rem;
}
/* Grid */
.grid {
display: grid;
gap: 1.5rem;
}
.grid-2 {
grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
grid-template-columns: repeat(4, 1fr);
}
.grid-auto {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
/* Spinner */
.spinner {
width: 20px;
height: 20px;
border: 2px solid rgba(255,255,255,0.3);
border-top-color: white;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Status Messages */
.status {
padding: 1rem 1.25rem;
border-radius: 10px;
margin-top: 1rem;
font-size: 0.9rem;
display: none;
}
.status.show {
display: flex;
align-items: center;
gap: 0.75rem;
}
.status.loading {
background: var(--orange-light);
color: var(--orange);
border: 1px solid var(--orange);
}
.status.success {
background: var(--green-light);
color: var(--green-dark);
border: 1px solid var(--green-vibrant);
}
.status.error {
background: #fef2f2;
color: #dc2626;
border: 1px solid #fca5a5;
}
/* ===============================
LIGHTBOX
=============================== */
.lightbox {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.9);
display: none;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 2rem;
}
.lightbox.show {
display: flex;
}
.lightbox img {
max-width: 100%;
max-height: 90vh;
border-radius: 8px;
box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
position: absolute;
top: 1.5rem;
right: 1.5rem;
width: 48px;
height: 48px;
background: var(--white);
border: none;
border-radius: 50%;
font-size: 1.5rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
}
.lightbox-close:hover {
background: var(--green-vibrant);
color: var(--white);
}
.lightbox-nav {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 56px;
height: 56px;
background: rgba(255,255,255,0.9);
border: none;
border-radius: 50%;
font-size: 2rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
color: var(--gray-700);
z-index: 1001;
}
.lightbox-nav:hover {
background: var(--green-vibrant);
color: var(--white);
transform: translateY(-50%) scale(1.1);
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-counter {
position: absolute;
bottom: 1.5rem;
left: 50%;
transform: translateX(-50%);
background: rgba(0,0,0,0.7);
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.9rem;
font-family: 'Space Mono', monospace;
}
/* ===============================
RESPONSIVE
=============================== */
@media (max-width: 1024px) {
.sidebar {
width: var(--sidebar-collapsed-width);
}
.sidebar .sidebar-brand,
.sidebar .nav-section-title,
.sidebar .nav-item-text,
.sidebar .sidebar-footer-text {
opacity: 0;
width: 0;
}
.main-content {
margin-left: var(--sidebar-collapsed-width);
}
.grid-4 {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
width: var(--sidebar-width);
}
.sidebar.mobile-open {
transform: translateX(0);
}
.sidebar .sidebar-brand,
.sidebar .nav-section-title,
.sidebar .nav-item-text,
.sidebar .sidebar-footer-text {
opacity: 1;
width: auto;
}
.main-content {
margin-left: 0;
}
.content-body {
padding: 1rem;
}
.grid-2, .grid-3, .grid-4 {
grid-template-columns: 1fr;
}
.mobile-menu-btn {
display: flex;
}
}
/* Mobile Menu Button (hidden by default) */
.mobile-menu-btn {
display: none;
position: fixed;
top: 1rem;
left: 1rem;
z-index: 101;
width: 44px;
height: 44px;
background: var(--sidebar-bg);
border: none;
border-radius: 10px;
color: var(--white);
font-size: 1.5rem;
cursor: pointer;
align-items: center;
justify-content: center;
}