/**
 * Oracle Collective Interface - Theme
 * STRICT COLOR PALETTE: Black, Silver, White ONLY
 * Copyright © 2025 Tammy L Casey
 */

:root {
    /* Core Colors - BLACK/SILVER/WHITE ONLY */
    --bg-black: #000000;
    --bg-dark: #0a0a0a;
    --bg-medium: #1a1a1a;

    --text-white: #FFFFFF;
    --text-silver: #E8E8E8;
    --text-gray: #C0C0C0;
    --text-dim: #808080;

    --border-silver: rgba(192, 192, 192, 0.3);
    --border-bright: rgba(232, 232, 232, 0.5);

    --glow-silver: rgba(192, 192, 192, 0.6);
    --glow-bright: rgba(255, 255, 255, 0.8);

    --particle-silver: rgba(192, 192, 192, 0.4);
    --particle-white: rgba(255, 255, 255, 0.6);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 20px var(--glow-silver);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", "Monaco", "Cascadia Code", "Courier New", monospace;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Borders */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-full: 9999px;

    --border-width-thin: 1px;
    --border-width-medium: 2px;
    --border-width-thick: 4px;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 400ms ease-in-out;

    /* Z-Index */
    --z-background: -1;
    --z-base: 1;
    --z-dropdown: 1000;
    --z-modal: 2000;
    --z-tooltip: 3000;
    --z-notification: 4000;

    /* Layout */
    --sidebar-width: 250px;
    --header-height: 60px;
    --footer-height: 40px;
    --input-height: 120px;

    /* Animations */
    --pulse-duration: 2s;
    --particle-speed: 30s;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-silver);
    background: var(--bg-black);
    overflow-x: hidden;
}

/* Accessibility - Visually Hidden */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip Link for Keyboard Navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--text-white);
    color: var(--bg-black);
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    font-weight: var(--font-weight-bold);
    border-radius: var(--border-radius-sm);
    z-index: var(--z-notification);
}

.skip-link:focus {
    top: var(--space-sm);
    left: var(--space-sm);
    outline: 2px solid var(--text-white);
    outline-offset: 2px;
}

/* Focus Visible (Keyboard Navigation) */
*:focus-visible {
    outline: 2px solid var(--text-white);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--text-silver);
    color: var(--bg-black);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
    background: var(--text-dim);
    border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-gray);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-white);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--text-white);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-silver);
}

a:focus {
    outline: 2px solid var(--text-white);
    outline-offset: 2px;
}

code {
    font-family: var(--font-mono);
    background: var(--bg-medium);
    padding: 2px 6px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9em;
}

pre {
    font-family: var(--font-mono);
    background: var(--bg-medium);
    padding: var(--space-md);
    border-radius: var(--border-radius-md);
    overflow-x: auto;
    margin-bottom: var(--space-md);
}

small {
    font-size: var(--font-size-sm);
    color: var(--text-dim);
}

strong {
    font-weight: var(--font-weight-bold);
    color: var(--text-white);
}

hr {
    border: none;
    border-top: var(--border-width-thin) solid var(--border-silver);
    margin: var(--space-lg) 0;
}

/* Lists */
ul, ol {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-md);
}

li {
    margin-bottom: var(--space-sm);
}

/* Buttons */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    transition: all var(--transition-fast);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--text-white);
    color: var(--bg-black);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    background: var(--text-silver);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-silver);
    padding: var(--space-sm) var(--space-lg);
    border: var(--border-width-thin) solid var(--border-silver);
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--border-bright);
    color: var(--text-white);
}

.btn-danger {
    background: var(--bg-medium);
    color: var(--text-white);
    padding: var(--space-sm) var(--space-lg);
    border: var(--border-width-thin) solid var(--border-silver);
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
}

.btn-danger:hover:not(:disabled) {
    background: var(--bg-dark);
    border-color: var(--text-white);
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-full);
    background: transparent;
    color: var(--text-silver);
    transition: all var(--transition-fast);
}

.icon-btn:hover:not(:disabled) {
    background: var(--bg-medium);
    color: var(--text-white);
}

.icon-btn .icon {
    font-size: var(--font-size-lg);
}

/* Form Elements */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-medium);
    border: var(--border-width-thin) solid var(--border-silver);
    border-radius: var(--border-radius-md);
    color: var(--text-silver);
    font-family: inherit;
    font-size: inherit;
    transition: all var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--border-bright);
    background: var(--bg-dark);
    box-shadow: var(--shadow-glow);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-dim);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: var(--space-sm);
    accent-color: var(--text-white);
}

input[type="range"] {
    accent-color: var(--text-silver);
}

label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--text-silver);
    font-weight: var(--font-weight-medium);
}

/* Loading States */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse var(--pulse-duration) infinite;
}

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

.spinning {
    animation: spin 1s linear infinite;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { display: flex; flex-direction: column; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-sm); }
.p-2 { padding: var(--space-md); }
.p-3 { padding: var(--space-lg); }
