VR-MEDIA / src /app /globals.css
Zero124's picture
VR Media Server 2.0 — latest build (custom Blomp thumbnail auto-detection + full pipeline)
5c0175e
Raw History Blame Contribute Delete
14.3 kB
/* ==========================================================================
VR Media Server 2.0 — YouTube-inspired design system
--------------------------------------------------------------------------
Implements the token set from youtube.com-DESIGN.md:
- Dark-first surfaces (#0F0F0F) with light text (#EEEEEE)
- Primary CTA blue #065FD4, hover #3EA6FF, pressed #0540AA
- Roboto typography, 4px spacing scale, 20px pill buttons, sharp inputs
- Shadows only for hover / dropdown / modal / toast layers
All shadcn/ui semantic variables below are re-pointed at YouTube values, so
every existing component inherits the new system without being rewritten.
========================================================================== */
@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-roboto);
--font-mono: var(--font-roboto-mono);
--font-display: var(--font-roboto);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
/* Border radius roles (§5 Border Radius Scale) */
--radius-sm: 2px;
--radius-md: 4px;
--radius-lg: 4px;
--radius-xl: 8px;
--radius-pill: 20px;
--radius-pill-lg: 40px;
/* YouTube palette, exposed as Tailwind utilities (bg-yt-blue, text-yt-red…) */
--color-yt-blue: var(--yt-blue);
--color-yt-blue-bright: var(--yt-blue-bright);
--color-yt-blue-pressed: var(--yt-blue-pressed);
--color-yt-red: var(--yt-red);
--color-yt-premium: var(--yt-premium);
--color-yt-magenta: var(--yt-magenta);
--color-yt-teal: var(--yt-teal);
--color-yt-purple-light: var(--yt-purple-light);
--color-yt-purple-medium: var(--yt-purple-medium);
--color-yt-error: var(--yt-error);
--color-yt-error-intense: var(--yt-error-intense);
--color-yt-error-deep: var(--yt-error-deep);
--color-yt-success: var(--yt-success);
--color-yt-warning: var(--yt-warning);
--color-yt-black-deep: var(--yt-black-deep);
--color-yt-surface-1: var(--yt-surface-1);
--color-yt-surface-2: var(--yt-surface-2);
--color-yt-surface-3: var(--yt-surface-3);
--color-yt-gray-dark: var(--yt-gray-dark);
--color-yt-gray: var(--yt-gray);
--color-yt-light: var(--yt-light);
--color-yt-lighter: var(--yt-lighter);
/* Spacing scale - base unit 4px. Exposed as --space-* on purpose: Tailwind v4 reserves --spacing-* for its numeric sizing scale, and naming keys there hijacks max-w-md / max-w-7xl / w-lg and collapses the layout. */
--space-xs: 4px;
--space-sm: 8px;
--space-md: 12px;
--space-lg: 16px;
--space-xl: 20px;
--space-2xl: 24px;
--space-3xl: 32px;
--space-4xl: 48px;
--space-5xl: 52px;
--space-6xl: 56px;
--space-7xl: 60px;
--space-8xl: 120px;
}
/* --------------------------------------------------------------------------
Root tokens — dark is the system default (§9.5 "Dark background is default")
-------------------------------------------------------------------------- */
:root {
--radius: 4px;
/* Raw YouTube palette (§2) */
--yt-blue: #065fd4; /* Primary CTA */
--yt-blue-bright: #3ea6ff; /* Primary hover / bright */
--yt-blue-pressed: #0540aa; /* Primary pressed */
--yt-red: #ff0033; /* Error intense / brand tile */
--yt-premium: #ff5577; /* Premium brand */
--yt-magenta: #7f0e7f; /* Premium badge */
--yt-teal: #aaddddaa; /* Accent teal (see solid below) */
--yt-teal: #aadddd;
--yt-purple-light: #bbaacc;
--yt-purple-medium: #bbaadd;
--yt-error: #e1002d;
--yt-error-intense: #ff0033;
--yt-error-deep: #c30027;
--yt-success: #2ba640;
/* Documented extension: the source system defines no warning role, so we add
one that sits between Success and Error for "degraded" states. */
--yt-warning: #f5a623;
--yt-black-deep: #0f0f0f; /* Primary surface + primary text on light */
--yt-surface-1: #0f0f0f; /* Page background */
--yt-surface-2: #181818; /* Cards */
--yt-surface-3: #212121; /* Popovers / raised */
--yt-gray-dark: #606060; /* Tertiary text, borders */
--yt-gray: #aaaaaa; /* Placeholder, low emphasis */
--yt-light: #f1f1f1;
--yt-lighter: #eeeeee; /* Body text on dark */
/* Semantic mapping consumed by every component */
--background: #0f0f0f;
--foreground: #eeeeee;
--card: #181818;
--card-foreground: #eeeeee;
--popover: #212121;
--popover-foreground: #eeeeee;
--primary: #065fd4;
--primary-foreground: #ffffff;
--secondary: #272727;
--secondary-foreground: #f1f1f1;
--muted: #272727;
--muted-foreground: #aaaaaa;
--accent: #3ea6ff;
--accent-foreground: #0f0f0f;
--destructive: #e1002d;
--destructive-foreground: #ffffff;
--border: rgba(255, 255, 255, 0.1);
--input: rgba(255, 255, 255, 0.15);
--ring: #3ea6ff;
--chart-1: #065fd4;
--chart-2: #ff5577;
--chart-3: #bbaadd;
--chart-4: #2ba640;
--chart-5: #aadddd;
--sidebar: #0f0f0f;
--sidebar-foreground: #eeeeee;
--sidebar-primary: #065fd4;
--sidebar-primary-foreground: #ffffff;
--sidebar-accent: rgba(255, 255, 255, 0.08);
--sidebar-accent-foreground: #ffffff;
--sidebar-border: rgba(255, 255, 255, 0.1);
--sidebar-ring: #3ea6ff;
/* Elevation (§6) */
--elevation-hover: 0px 2px 8px rgba(0, 0, 0, 0.1);
--elevation-raised: 0px 4px 12px rgba(0, 0, 0, 0.15);
--elevation-modal: 0px 8px 24px rgba(0, 0, 0, 0.2);
--elevation-toast: 0px 4px 16px rgba(0, 0, 0, 0.25);
/* Layout metrics (§5) */
--layout-header-height: 56px;
--layout-sidebar-width: 240px;
--layout-max-width: 1440px;
}
/* .dark is identical — the app renders dark-first and never light-flashes. */
.dark {
--background: #0f0f0f;
--foreground: #eeeeee;
--card: #181818;
--card-foreground: #eeeeee;
--popover: #212121;
--popover-foreground: #eeeeee;
--primary: #065fd4;
--primary-foreground: #ffffff;
--secondary: #272727;
--secondary-foreground: #f1f1f1;
--muted: #272727;
--muted-foreground: #aaaaaa;
--accent: #3ea6ff;
--accent-foreground: #0f0f0f;
--destructive: #e1002d;
--destructive-foreground: #ffffff;
--border: rgba(255, 255, 255, 0.1);
--input: rgba(255, 255, 255, 0.15);
--ring: #3ea6ff;
--chart-1: #065fd4;
--chart-2: #ff5577;
--chart-3: #bbaadd;
--chart-4: #2ba640;
--chart-5: #aadddd;
--sidebar: #0f0f0f;
--sidebar-foreground: #eeeeee;
--sidebar-primary: #065fd4;
--sidebar-primary-foreground: #ffffff;
--sidebar-accent: rgba(255, 255, 255, 0.08);
--sidebar-accent-foreground: #ffffff;
--sidebar-border: rgba(255, 255, 255, 0.1);
--sidebar-ring: #3ea6ff;
}
/* --------------------------------------------------------------------------
Base layer — typography per §3
-------------------------------------------------------------------------- */
@layer base {
* {
@apply border-border;
outline-color: color-mix(in srgb, var(--ring) 50%, transparent);
}
html {
-webkit-text-size-adjust: 100%;
}
body {
background-color: var(--background);
color: var(--foreground);
/* §7 Don't: no gradient noise or neon washes — flat dark surfaces only. */
font-family: var(--font-roboto), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-size: 14px;
font-weight: 400;
line-height: 20px;
letter-spacing: 0;
}
/* Hierarchy (§3) */
h1 {
font-size: 32px;
line-height: 38px;
font-weight: 500;
}
h2 {
font-size: 16px;
line-height: 24px;
font-weight: 600;
}
h3 {
font-size: 14px;
line-height: 20px;
font-weight: 500;
}
small {
font-size: 13.3px;
font-weight: 400;
}
code,
pre {
font-family: var(--font-roboto-mono), ui-monospace, monospace;
}
/* Inputs are sharp with a blue focus underline (§4 Text Input) */
::placeholder {
color: var(--yt-gray-dark);
opacity: 0.7;
}
/* Minimum 44x44 touch targets on touch devices (§8) */
@media (pointer: coarse) {
button:not([data-compact]),
[role="button"]:not([data-compact]) {
min-height: 44px;
min-width: 44px;
}
}
}
/* --------------------------------------------------------------------------
Component layer
-------------------------------------------------------------------------- */
@layer components {
/* Display / hero type (§3) */
.yt-display {
font-size: 48px;
line-height: 56px;
font-weight: 600;
letter-spacing: 0;
}
@media (max-width: 599px) {
.yt-display {
font-size: 36px;
line-height: 42px;
}
}
.yt-h1 {
font-size: 32px;
line-height: 38px;
font-weight: 500;
}
.yt-h2 {
font-size: 16px;
line-height: 24px;
font-weight: 600;
}
.yt-body {
font-size: 14px;
line-height: 20px;
font-weight: 400;
}
.yt-caption {
font-size: 13.3px;
line-height: 18px;
font-weight: 400;
color: var(--yt-gray);
}
.yt-label {
font-size: 14px;
line-height: 18.2px;
font-weight: 500;
}
.yt-micro {
font-size: 10px;
line-height: 14px;
font-weight: 400;
letter-spacing: 0.02em;
}
/* Content card (§4) — flat surface, 4px radius, hairline border, no glow */
.yt-card {
background: var(--yt-surface-2);
color: var(--yt-lighter);
border: 1px solid var(--border);
border-radius: 4px;
}
.yt-card-interactive {
transition: background-color 120ms ease, box-shadow 120ms ease;
}
.yt-card-interactive:hover {
background: #1f1f1f;
box-shadow: var(--elevation-hover);
cursor: pointer;
}
/* Kept for source compatibility: every `.glass-card` in the app now renders
as a flat YouTube content card instead of a blurred neon panel. */
.glass-card {
background: var(--yt-surface-2);
border: 1px solid var(--border);
border-radius: 4px;
backdrop-filter: none;
}
/* Pill button surface (§4 Primary Button) */
.yt-pill {
height: 40px;
padding: 0 16px;
border-radius: 20px;
font-size: 14px;
font-weight: 500;
line-height: 40px;
}
/* Sharp text input with blue focus underline (§4 Text Input) */
.yt-input {
background: transparent;
border: 0;
border-bottom: 1px solid var(--border);
border-radius: 0;
height: 40px;
font-size: 16px;
line-height: 22px;
color: var(--foreground);
}
.yt-input:focus {
outline: none;
border-bottom: 1px solid var(--yt-blue);
}
/* Chip / pill tag */
.yt-chip {
display: inline-flex;
align-items: center;
gap: 6px;
height: 32px;
padding: 0 12px;
border-radius: 16px;
background: rgba(255, 255, 255, 0.08);
color: var(--yt-lighter);
font-size: 13.3px;
font-weight: 500;
white-space: nowrap;
}
.yt-chip[data-active="true"] {
background: var(--yt-light);
color: var(--yt-black-deep);
}
.yt-divider {
height: 1px;
background: var(--border);
border: 0;
}
/* Status dot — pairs colour with adjacent text so colour is never the only
status signal (§7 Don't: "use color alone to convey status"). */
.yt-dot {
display: inline-block;
height: 8px;
width: 8px;
border-radius: 50%;
flex-shrink: 0;
}
/* Legacy neon helpers, remapped to flat palette colours so older markup
inherits the new system rather than glowing. */
.neon-cyan {
color: var(--yt-blue-bright);
text-shadow: none;
}
.neon-magenta {
color: var(--yt-premium);
text-shadow: none;
}
.neon-glow-cyan,
.neon-glow-magenta {
box-shadow: none;
}
/* Scrollbar — neutral greys (§2 Neutral Scale) */
.scrollbar-vr::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.scrollbar-vr::-webkit-scrollbar-track {
background: transparent;
}
.scrollbar-vr::-webkit-scrollbar-thumb {
background: #606060;
border-radius: 4px;
}
.scrollbar-vr::-webkit-scrollbar-thumb:hover {
background: #909090;
}
@keyframes vr-pulse {
0%,
100% {
opacity: 0.5;
}
50% {
opacity: 1;
}
}
.vr-pulse {
animation: vr-pulse 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
.vr-pulse {
animation: none;
}
}
/* Elevation utilities (§6) */
.elev-hover {
box-shadow: var(--elevation-hover);
}
.elev-raised {
box-shadow: var(--elevation-raised);
}
.elev-modal {
box-shadow: var(--elevation-modal);
}
.elev-toast {
box-shadow: var(--elevation-toast);
}
}