/* CRITICAL: Conthrax Font Loading Strategy - Highest Priority */

/* Direct import from CDN must come first */
@import url('https://fonts.cdnfonts.com/css/conthrax');

/* Primary font definitions with multiple formats for maximum compatibility */
@font-face {
  font-family: 'Conthrax';
  src: url('/fonts/Conthrax.ttf') format('truetype'),
       url('/fonts/ConTheAx.ttf') format('truetype'),
       url('https://fonts.cdnfonts.com/s/14153/Conthrax.woff') format('woff'),
       url('https://fonts.cdnfonts.com/s/14153/Conthrax.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap; /* Swap to ensure text is visible immediately */
}

@font-face {
  font-family: 'Conthrax';
  src: url('/fonts/Conthrax-SB.ttf') format('truetype'),
       url('/fonts/Conthrax-SemiBold.woff') format('woff'),
       url('https://fonts.cdnfonts.com/s/14153/Conthrax-SemiBold.woff2') format('woff2');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* System font fallback will be used until custom font loads */
@font-face {
  font-family: 'Conthrax';
  src: local('Arial'), local('Helvetica'), local('San Francisco'), local('Segoe UI'),
       url('/fonts/Conthrax.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Font stack fallbacks just in case */
:root {
  --font-primary: 'Conthrax', sans-serif;
}

/* 
* MAXIMUM SPECIFICITY SELECTORS 
* These will override any other styles in the app
*/

/* Global font force for ALL elements */
*, *::before, *::after,
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video, 
button, input, textarea, select, option {
  font-family: 'Conthrax', sans-serif !important;
}

/* Higher specificity for commonly targeted elements */
html body,
body * {
  font-family: 'Conthrax', sans-serif !important;
}

/* Target specific classes that might be added by frameworks */
.MuiTypography-root,
[class*="Typography"],
[class*="Text"],
[class*="Font"],
[class*="Label"],
[class*="Title"],
[class*="Heading"],
[class*="Button"],
[class*="Input"],
[class*="Select"],
[class*="Dropdown"],
[class*="Menu"],
[class*="List"],
[class*="Item"],
[class*="Card"],
[class*="Dialog"],
[class*="Modal"],
[class*="Popup"],
[class*="Tooltip"],
[class*="Tab"],
[class*="Nav"],
div[role="dialog"],
div[role="alert"],
div[role="button"],
div[role="tab"],
div[role="tabpanel"] {
  font-family: 'Conthrax', sans-serif !important;
}

/* Black background enforcement */
html, body, #root, [class*="root"], [class*="app"], [class*="App"], .bg-black {
  background-color: #000000 !important;
  color: #FFFFFF !important;
}

/* Force futuristic UI elements */
button, a.button, .btn, [class*="button"], [role="button"],
input, select, textarea, [class*="input"], [class*="select"], [class*="text-area"] {
  background-color: #000000 !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1), inset 0 0 5px rgba(255, 255, 255, 0.05) !important;
  transition: all 0.2s ease !important;
  font-family: 'Conthrax', sans-serif !important;
}

/* Hover state enhancements */
button:hover, a.button:hover, .btn:hover, [class*="button"]:hover, [role="button"]:hover,
input:focus, select:focus, textarea:focus, [class*="input"]:focus, [class*="select"]:focus, [class*="text-area"]:focus {
  background-color: #0a0a0a !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15), inset 0 0 8px rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  font-family: 'Conthrax', sans-serif !important;
}

/* Card styling */
[class*="card"], .Card, .card, [role="dialog"], [role="alert"], [class*="dialog"], [class*="alert"], [class*="modal"], [class*="popup"] {
  background-color: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1), inset 0 0 5px rgba(255, 255, 255, 0.05) !important;
  font-family: 'Conthrax', sans-serif !important;
}

/* Special styles for navigation elements */
nav, header, footer, aside, [class*="nav"], [class*="header"], [class*="footer"], [class*="aside"], [class*="sidebar"] {
  background-color: #000000 !important;
  font-family: 'Conthrax', sans-serif !important;
}

/* Enforce font on dynamic content */
[id*="content"], [class*="content"], main, article, section {
  font-family: 'Conthrax', sans-serif !important;
}