/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&family=Source+Code+Pro:wght@400;500;600&family=Fira+Code:wght@300;400;500;600&family=Nunito:wght@300;400;500;600;700;800&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* NOTE: Theme colors are injected by server - do not add theme variables here */
    
    /* Surface Colors (Glassy Effects) */
    --surface-primary: rgba(255, 255, 255, 0.08);
    --surface-secondary: rgba(255, 255, 255, 0.12);
    --surface-hover: rgba(255, 255, 255, 0.16);
    --surface-active: rgba(255, 255, 255, 0.2);
    
    /* Border Colors */
    --border-color: rgba(255, 255, 255, 0.2);
    --border-hover: rgba(255, 255, 255, 0.3);
    --border-focus: var(--theme-accent);
    
    /* Glass Effects */
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-blur: blur(16px);
    
    /* Primary Color Variations */
    --primary-alpha-05: rgba(var(--primary-rgb), 0.05);
    --primary-alpha-10: rgba(var(--primary-rgb), 0.1);
    --primary-alpha-20: rgba(var(--primary-rgb), 0.2);
    --primary-alpha-25: rgba(var(--primary-rgb), 0.25);
    --primary-alpha-30: rgba(var(--primary-rgb), 0.3);
    --primary-alpha-60: rgba(var(--primary-rgb), 0.6);
    --primary-alpha-80: rgba(var(--primary-rgb), 0.8);
    
    /* Success Color Variations */
    --success-alpha-05: rgba(var(--success-rgb), 0.05);
    --success-alpha-08: rgba(var(--success-rgb), 0.08);
    --success-alpha-10: rgba(var(--success-rgb), 0.1);
    --success-alpha-30: rgba(var(--success-rgb), 0.3);
    --success-alpha-40: rgba(var(--success-rgb), 0.4);
    
    /* Secondary Color Variations */
    --secondary-alpha-05: rgba(var(--secondary-rgb), 0.05);
    --secondary-alpha-10: rgba(var(--secondary-rgb), 0.1);
    --secondary-alpha-80: rgba(var(--secondary-rgb), 0.8);
    --secondary-alpha-90: rgba(var(--secondary-rgb), 0.9);
    
    /* Error Color Variations */
    --error-alpha-10: rgba(var(--error-rgb), 0.1);
    --error-alpha-30: rgba(var(--error-rgb), 0.3);
    --error-alpha-40: rgba(var(--error-rgb), 0.4);
    
    /* Theme-aware Shadows */
    --drop-shadow-primary: drop-shadow(0 0 8px var(--primary-alpha-30));
    --drop-shadow-success: drop-shadow(0 0 8px var(--success-alpha-30));
    --box-shadow-primary-light: 0 0 0 3px var(--primary-alpha-10);
    --box-shadow-primary-medium: 0 0 0 3px var(--primary-alpha-20);
    --box-shadow-primary-focus: 0 0 0 2px var(--primary-alpha-25);
    --shadow-glow-primary: 0 0 20px var(--primary-alpha-30);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px var(--primary-alpha-30);
    
    /* Border Radius */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Font Families */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Poppins', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', Monaco, monospace;
    --font-elegant: 'Nunito', 'Poppins', sans-serif;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contextual Font Usage */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.logo, .brand-text {
    font-family: var(--font-display);
    font-weight: 600;
}

p, .body-text {
    font-family: var(--font-body);
    font-weight: 400;
}

.elegant-text, .about-text, .privacy-text {
    font-family: var(--font-elegant);
    line-height: 1.8;
}

code, pre, .code-text, .filename, .technical-info {
    font-family: var(--font-mono);
    font-weight: 400;
}

.nav-link, .menu-item {
    font-family: var(--font-heading);
    font-weight: 500;
}

.tool-name, .feature-title {
    font-family: var(--font-heading);
    font-weight: 600;
}

.description, .tool-description {
    font-family: var(--font-body);
    font-weight: 400;
}

.stats-text, .stat-content {
    font-family: var(--font-heading);
    font-weight: 600;
}

.filename, .file-name {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.9em;
}

.button-text, button {
    font-family: var(--font-heading);
    font-weight: 600;
}

.metadata, .video-details {
    font-family: var(--font-body);
    font-weight: 400;
}

.feature-tag {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Ensure all text elements inherit light colors */
h1, h2, h3, h4, h5, h6, p, span, div, label, input, select, textarea, button {
    color: inherit;
}

/* Override any potential dark text */
* {
    color: inherit;
}

/* Glass Morphism Base Class */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

/* Interactive Glass Elements */
.glass-interactive {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    cursor: pointer;
}

.glass-interactive:hover {
    background: rgba(31, 26, 23, 0.85);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Automatic contrast text for bright backgrounds */
.auto-contrast-text {
    color: var(--primary-contrast-text) !important;
}

/* For elements with primary background that need automatic text color */
.primary-bg-auto-text {
    background: var(--primary-color);
    color: var(--primary-contrast-text) !important;
} 

.ag-header-cell {
    --ag-header-cell-moving-background-color: transparent;
}

.ag-header-cell:active {
    transform: translateY(0) !important;
}

/* Enable header text wrapping */
.ag-header-cell-label {
    white-space: normal !important;
    line-height: normal;
}

.ag-theme-alpine-dark .ag-header-cell-text {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

[class*=ag-theme-] {
    font-size: 12px !important;
}