/* ============================================================
   NOVRID TEAM PORTAL – Global Design System
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
    /* --- Backgrounds --- */
    --color-bg-base: #060a13;
    --color-bg-surface: #0d1117;
    --color-bg-card: #161b22;
    --color-bg-card-hover: #1c2129;
    --color-bg-elevated: #1a1f2e;

    /* --- Borders --- */
    --color-border: #21262d;
    --color-border-hover: #30363d;
    --color-border-active: #4A90D9;

    /* --- Primary (Novrid Blue) --- */
    --color-primary: #4A90D9;
    --color-primary-light: #6BB5FF;
    --color-primary-dark: #3A7BC8;
    --color-primary-glow: rgba(74, 144, 217, 0.15);
    --color-primary-bg: rgba(74, 144, 217, 0.08);

    /* --- Semantic Colors --- */
    --color-success: #3fb950;
    --color-success-bg: rgba(63, 185, 80, 0.1);
    --color-warning: #d29922;
    --color-warning-bg: rgba(210, 153, 34, 0.1);
    --color-danger: #f85149;
    --color-danger-bg: rgba(248, 81, 73, 0.1);
    --color-info: #58a6ff;
    --color-info-bg: rgba(88, 166, 255, 0.1);
    --color-purple: #a371f7;
    --color-purple-bg: rgba(163, 113, 247, 0.1);

    /* --- Text --- */
    --color-text-primary: #f0f6fc;
    --color-text-secondary: #8b949e;
    --color-text-muted: #484f58;
    --color-text-link: #58a6ff;

    /* --- Discord --- */
    --color-discord: #5865F2;
    --color-discord-hover: #4752c4;

    /* --- Spacing (8px grid) --- */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;

    /* --- Border Radius --- */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* --- Shadows --- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px var(--color-primary-glow);
    --shadow-glow-lg: 0 0 40px var(--color-primary-glow);

    /* --- Transitions --- */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* --- Typography --- */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* --- Layout --- */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
}

/* ============================================================
   CSS Reset
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-base);
    min-height: 100vh;
    overflow-x: hidden;
}

img, video, svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--color-text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--color-primary-light);
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

/* ============================================================
   Selection & Scrollbar
   ============================================================ */
::selection {
    background-color: rgba(74, 144, 217, 0.3);
    color: var(--color-text-primary);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-hover);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

/* ============================================================
   Focus Styles
   ============================================================ */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-primary);
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-md { font-size: 16px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 28px; }
.text-4xl { font-size: 32px; }
.text-5xl { font-size: 40px; }
.text-6xl { font-size: 48px; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }

.text-center { text-align: center; }
.text-right { text-align: right; }

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   Placeholder
   ============================================================ */
::placeholder {
    color: var(--color-text-muted);
    opacity: 1;
}

/* ============================================================
   Utility Classes
   ============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-center { display: flex; align-items: center; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; align-items: center; }

.relative { position: relative; }
.absolute { position: absolute; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow-y: auto; }

.cursor-pointer { cursor: pointer; }
.cursor-grab { cursor: grab; }
.cursor-grabbing { cursor: grabbing; }

.select-none { user-select: none; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.whitespace-nowrap { white-space: nowrap; }

.border-none { border: none; }

.rounded-full { border-radius: var(--radius-full); }

/* Spacing Utilities */
.m-0 { margin: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

/* ============================================================
   Keyframe Animations
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--color-primary-glow); }
    50% { box-shadow: 0 0 40px var(--color-primary-glow), 0 0 60px rgba(74, 144, 217, 0.1); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 0.5; }
    100% { transform: scale(4); opacity: 0; }
}

@keyframes borderGlow {
    0%, 100% { border-color: var(--color-border); }
    50% { border-color: var(--color-primary); }
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* ============================================================
   Animation Utilities
   ============================================================ */
.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }
.animate-slideInUp { animation: slideInUp 0.3s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.3s ease forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ============================================================
   Responsive Breakpoints (mobile-first)
   ============================================================ */
@media (max-width: 1200px) {
    h1 { font-size: 28px; }
    h2 { font-size: 22px; }
}

@media (max-width: 768px) {
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }

    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .show-mobile { display: none !important; }
}
