h-lab/src/main/resources/static/css/style.css

746 lines
18 KiB
CSS

/* @import 'variables.css'; - Loaded via HTML */
/* Reset & Basics */
.container {
max-width: 1600px;
margin: 0 auto;
padding: 0 2.5rem;
}
a {
text-decoration: none;
color: inherit;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
/* Utility Classes */
.flex {
display: flex;
}
.flex-col {
flex-direction: column;
}
.items-center {
align-items: center;
}
.justify-between {
justify-content: space-between;
}
.gap-2 {
gap: 0.5rem;
}
.gap-4 {
gap: 1rem;
}
.w-full {
width: 100%;
}
.text-sm {
font-size: 0.875rem;
}
.text-lg {
font-size: 1.125rem;
font-weight: 600;
}
.text-xl {
font-size: 1.5rem;
font-weight: 700;
}
.text-muted {
color: var(--text-muted);
}
.font-bold {
font-weight: 700;
}
.mt-4 {
margin-top: 1rem;
}
.mb-4 {
margin-bottom: 1rem;
}
.p-4 {
padding: 1rem;
}
.p-6 {
padding: 1.5rem;
}
/* ===== Utility backfill (classes already used in templates, previously undefined) ===== */
/* Spacing — padding */
.p-0 { padding: 0; }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-8 { padding: var(--space-8); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.pr-4 { padding-right: var(--space-4); }
/* Spacing — margin */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-6 { margin-bottom: var(--space-6); }
.ml-2 { margin-left: var(--space-2); }
/* Spacing — gap */
.gap-1 { gap: var(--space-1); }
.gap-3 { gap: var(--space-3); }
/* Fl/grid helpers */
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.items-start { align-items: flex-start; }
.block { display: block; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }
.top-4 { top: var(--space-4); }
.left-4 { left: var(--space-4); }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.h-full { height: 100%; }
.rounded-lg { border-radius: var(--radius-md); }
.opacity-0 { opacity: 0; }
.cursor-pointer { cursor: pointer; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
/* Typography */
.text-xs { font-size: 0.75rem; }
.text-2xl { font-size: 1.875rem; font-weight: 700; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-normal { font-weight: 400; }
/* Colors */
.text-white { color: #fff; }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-blue-400 { color: #60a5fa; }
.text-cyan-400 { color: #22d3ee; }
.text-pink-400 { color: #f472b6; }
.text-purple-400 { color: #c084fc; }
.text-orange-400 { color: #fb923c; }
.text-yellow-400 { color: #facc15; }
.text-emerald-400 { color: #34d399; }
/* Transitions */
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.transition-opacity { transition: opacity 0.2s ease; }
.transition-all { transition: all 0.2s ease; }
/* Hover utilities (escaped selectors) */
.hover\:text-white:hover { color: #fff; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:text-\[var\(--primary\)\]:hover { color: var(--primary); }
.hover\:border-\[var\(--primary\)\]:hover { border-color: var(--primary); }
.border-\[var\(--glass-border\)\] { border: 1px solid var(--glass-border); }
.hover\:bg-blue-400\/10:hover { background: rgba(96, 165, 250, 0.1); }
.hover\:bg-cyan-400\/10:hover { background: rgba(34, 211, 238, 0.1); }
.hover\:bg-pink-400\/10:hover { background: rgba(244, 114, 182, 0.1); }
.hover\:bg-purple-400\/10:hover { background: rgba(192, 132, 252, 0.1); }
.hover\:bg-orange-400\/10:hover { background: rgba(251, 146, 60, 0.1); }
.hover\:bg-emerald-400\/10:hover { background: rgba(52, 211, 153, 0.1); }
.hover\:bg-yellow-400\/10:hover { background: rgba(250, 204, 21, 0.1); }
/* Group hover reveal */
.group:hover .group-hover\:opacity-100 { opacity: 1; }
/* Spin animation */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) {
.animate-spin { animation: none; }
}
/* Components */
/* GLASS CARD */
.card {
background: var(--bg-glass);
backdrop-filter: blur(var(--backdrop-blur));
-webkit-backdrop-filter: blur(var(--backdrop-blur));
border: 1px solid var(--glass-border);
border-radius: var(--radius-lg);
padding: 1.5rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
position: relative;
overflow: hidden;
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
border-color: var(--glass-highlight);
}
/* BUTTON */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.6rem 1.25rem;
border-radius: var(--radius-md);
font-weight: 600;
transition: all 0.2s;
cursor: pointer;
border: 1px solid transparent;
}
.btn-primary {
background: var(--primary-gradient);
color: white;
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
transform: translateY(-1px);
}
.btn-ghost {
background: transparent;
color: var(--text-secondary);
}
.btn-ghost:hover {
background: rgba(255, 255, 255, 0.05);
color: var(--text-primary);
border-color: var(--glass-border);
}
.btn-secondary {
background: rgba(255, 255, 255, 0.06);
color: var(--text-primary);
border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
background: rgba(255, 255, 255, 0.1);
border-color: var(--glass-highlight);
transform: translateY(-1px);
}
.btn-outline {
background: transparent;
color: var(--text-secondary);
border: 1px solid var(--glass-border);
}
.btn-outline:hover {
color: var(--text-primary);
border-color: var(--primary);
}
/* SIDEBAR SPECIFIC */
:root {
--sidebar-width: 260px;
--sidebar-collapsed-width: 80px;
--header-height: 64px;
}
.sidebar {
width: var(--sidebar-width);
height: 100vh;
position: fixed;
left: 0;
top: 0;
display: flex;
flex-direction: column;
background-color: var(--bg-glass);
backdrop-filter: blur(20px);
border-right: 1px solid var(--glass-border);
z-index: 50;
transition: width 0.3s ease;
overflow-x: hidden;
/* Prevent horizontal scroll during transition */
}
/* User Profile Section */
.user-profile-container {
padding: 1rem;
margin: 0 1rem 1rem 1rem;
border-radius: 12px;
border: 1px solid var(--glass-border);
background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
transition: all 0.3s ease;
}
.user-profile-content {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.75rem;
overflow: hidden;
}
/* Toggle Button */
.sidebar-toggle-btn {
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border-radius: 6px;
color: var(--text-muted);
cursor: pointer;
transition: all 0.2s;
border: 1px solid transparent;
background: transparent;
}
.sidebar-toggle-btn:hover {
color: var(--text-primary);
background: rgba(255, 255, 255, 0.05);
border-color: var(--glass-border);
}
/* Collapsed State */
.sidebar.collapsed {
width: var(--sidebar-collapsed-width);
}
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .user-info {
display: none;
opacity: 0;
}
/* Header in collapsed menu */
.sidebar.collapsed .p-6 {
/* Target the header div which has p-6 */
padding: 1rem;
flex-direction: column;
gap: 1rem;
justify-content: center;
}
.sidebar.collapsed .sidebar-toggle-btn {
transform: rotate(180deg);
/* Rotate chevron */
}
.sidebar.collapsed .nav-item {
justify-content: center;
padding: 0.85rem 0;
}
.sidebar.collapsed .nav-icon {
margin-right: 0;
}
.sidebar.collapsed .user-profile-container {
padding: 0.75rem;
margin: 0 0.5rem 1rem 0.5rem;
border: none;
background: transparent;
}
.sidebar.collapsed .user-profile-content {
justify-content: center;
margin-bottom: 0;
}
.sidebar.collapsed .sign-out-btn span {
display: none;
}
.sidebar.collapsed .sign-out-btn {
padding: 0.5rem;
}
/* NAV ITEM */
.nav-item {
display: flex;
align-items: center;
padding: 0.85rem 1rem;
border-radius: 0 var(--radius-md) var(--radius-md) 0;
transition: all 0.2s ease;
color: var(--text-secondary);
border-left: 3px solid transparent;
font-weight: 500;
white-space: nowrap;
/* Keep text on one line */
overflow: hidden;
}
.nav-item:hover {
color: var(--text-primary);
background: rgba(255, 255, 255, 0.03);
}
.nav-item.active {
background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), transparent);
border-left: 3px solid var(--primary);
color: var(--text-primary);
box-shadow: 0 4px 12px -4px rgba(59, 130, 246, 0.2);
font-weight: 600;
}
.nav-icon {
margin-right: 0.875rem;
color: currentColor;
min-width: 24px;
/* Fix icon size */
}
.nav-item.active .nav-icon {
color: var(--primary);
filter: drop-shadow(0 0 8px var(--primary-glow));
}
/* Main Content Adjustment based on sidebar */
#mainContent {
transition: margin-left 0.3s ease;
margin-left: var(--sidebar-width);
}
body.sidebar-collapsed #mainContent {
margin-left: var(--sidebar-collapsed-width);
}
/* Responsive */
@media (max-width: 1024px) {
.sidebar {
width: var(--sidebar-collapsed-width);
}
.sidebar .brand-text,
.sidebar .nav-text,
.sidebar .user-info {
display: none;
}
.sidebar .nav-item {
justify-content: center;
padding: 0.85rem 0;
}
.sidebar .nav-icon {
margin-right: 0;
}
/* Auto-collapse helpers handled via JS class, but default CSS fallback */
#mainContent {
margin-left: var(--sidebar-collapsed-width);
}
}
/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
/* Layout Helpers */
.mobile-col {
flex-direction: column !important;
}
.mobile-w-full {
width: 100% !important;
}
.mobile-items-start {
align-items: flex-start !important;
}
.mobile-gap-4 {
gap: 1rem !important;
}
.mobile-border-0 {
border: none !important;
}
/* Container adjustments */
.container {
padding: 0 1rem;
}
/* Sidebar Overrides for Mobile */
:root {
--sidebar-collapsed-width: 0px;
/* Hide completely on mobile if collapsed */
}
.sidebar {
transform: translateX(-100%);
}
.sidebar:not(.collapsed) {
transform: translateX(0);
width: 100%;
/* Full width sidebar on mobile */
background: rgba(10, 10, 10, 0.95);
/* Darker opaque bg */
}
body.sidebar-collapsed #mainContent {
margin-left: 0;
}
#mainContent {
margin-left: 0 !important;
/* Always 0 on mobile unless overlay logic added, but for now stack */
}
/* Video Detail Specifics */
.video-header-image {
width: 100% !important;
height: auto !important;
aspect-ratio: 16/9;
margin-bottom: 1rem;
}
/* Stats Grid */
.stats-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
width: 100%;
}
/* Tabs */
.tabs-container {
overflow-x: auto;
padding-bottom: 0.5rem;
margin-bottom: 1rem;
-webkit-overflow-scrolling: touch;
}
.tab-btn {
white-space: nowrap;
}
/* Mobile Menu Toggle */
.mobile-menu-btn {
display: flex !important;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
margin-bottom: 1rem;
background: transparent;
color: white;
border: 1px solid var(--glass-border);
border-radius: var(--radius-md);
cursor: pointer;
}
}
/* Default hidden for desktop */
.mobile-menu-btn {
display: none;
}
/* Mobile Responsive Tables (Card View) */
@media (max-width: 768px) {
table,
thead,
tbody,
th,
td,
tr {
display: block;
}
/* Hide table headers (but not display:none for accessibility, usually, but here simplicity) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr {
margin-bottom: 1rem;
background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--glass-border);
border-radius: var(--radius-md);
padding: 1rem;
}
td {
border: none;
position: relative;
padding-left: 50% !important;
/* Make space for label */
padding-top: 0.5rem !important;
padding-bottom: 0.5rem !important;
min-height: 2rem;
display: flex;
align-items: center;
text-align: right;
justify-content: flex-end;
}
td::before {
content: attr(data-label);
position: absolute;
left: 1rem;
width: 45%;
padding-right: 10px;
white-space: nowrap;
text-align: left;
font-weight: bold;
color: var(--text-muted);
}
/* Specific adjustments for certain columns if needed */
td[data-label="Video"] {
padding-left: 0 !important;
display: block;
text-align: left;
}
td[data-label="Video"]::before {
display: none;
/* Hide label for video title/thumb block to give it full width */
}
td[data-label="Rank"] {
display: inline-block;
padding: 0 !important;
margin-bottom: 0.5rem;
width: auto;
}
td[data-label="Rank"]::before {
display: none;
}
td[data-label="Rank"] span {
font-size: 0.875rem !important;
background: rgba(var(--primary-rgb), 0.1);
/* fallback if var not ready */
padding: 2px 8px;
border-radius: 4px;
color: var(--text-muted);
border: 1px solid var(--glass-border);
}
/* Customize Rank appearance to look like a badge */
}
/* ===== Shared components (added) ===== */
/* Progress bar (dashboard funnel, distributions, …) */
.bar-track {
flex: 1;
height: 8px;
background: rgba(255, 255, 255, 0.06);
border-radius: var(--radius-full);
overflow: hidden;
}
.bar-fill {
height: 100%;
border-radius: var(--radius-full);
transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
.bar-fill { transition: none; }
}
/* Badge */
.badge {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 0.7rem;
font-weight: 600;
padding: 2px 8px;
border-radius: var(--radius-full);
border: 1px solid transparent;
line-height: 1.4;
}
.badge-muted { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.badge-primary { background: rgba(var(--primary-rgb), 0.15); color: var(--primary); }
.badge-success { background: rgba(var(--success-rgb), 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-danger { background: rgba(var(--danger-rgb), 0.15); color: var(--danger); }
/* Skeleton shimmer */
.skeleton {
position: relative;
overflow: hidden;
background: rgba(255, 255, 255, 0.05);
border-radius: var(--radius-md);
}
.skeleton::after {
content: "";
position: absolute;
inset: 0;
transform: translateX(-100%);
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
.skeleton::after { animation: none; }
}
/* Dark form controls (unify select/input across pages) */
select, input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="datetime-local"], textarea {
background: rgba(255, 255, 255, 0.04);
color: var(--text-primary);
border: 1px solid var(--glass-border);
border-radius: var(--radius-md);
padding: 0.5rem 0.75rem;
font-family: inherit;
font-size: 0.875rem;
transition: border-color 0.2s ease, background 0.2s ease;
}
select:focus, input:focus, textarea:focus {
outline: none;
border-color: var(--primary);
background: rgba(255, 255, 255, 0.06);
}
select option { background: #0f172a; color: var(--text-primary); }
/* Table polish */
table { width: 100%; border-collapse: collapse; }
thead th {
text-align: left;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--text-muted);
padding: 0.6rem 0.75rem;
border-bottom: 1px solid var(--glass-border);
}
tbody td { padding: 0.6rem 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }