:root {
    --primary-color: #bb86fc;
    --primary-variant: #3700b3;
    --secondary-color: #03dac6;
    --background-dark: #121212;
    --surface-dark: #1e1e1e;
    --error-color: #cf6679;
    --on-primary: #000000;
    --on-secondary: #000000;
    --on-background: #ffffff;
    --on-surface: #e0e0e0;
    --on-error: #000000;
}

/* Base Styles */
body {
    background-color: var(--background-dark);
    color: var(--on-surface);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--on-background);
    font-weight: 700;
}

/* Mobile First Spacing */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* UI Components */
.card {
    background-color: var(--surface-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease;
}

.card:active {
    transform: scale(0.98);
}

/* Hitboxes Rule: 48x48 min */
.btn {
    min-height: 48px;
    min-width: 48px;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--on-primary);
    border: none;
}

.btn-primary:active {
    background-color: var(--primary-variant);
}

/* Navbar */
.navbar {
    background-color: var(--surface-dark) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

/* HTMX Transitions */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Dark Mode Form Inputs */
.form-control, .form-select {
    background-color: #2c2c2c;
    border: 1px solid #444;
    color: #fff;
    min-height: 48px;
    border-radius: 8px;
}

.form-control:focus {
    background-color: #333;
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(187, 134, 252, 0.25);
}

/* Contrast Fixes for Dashboard Accessibility */
.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

h2 {
    color: var(--on-background) !important;
}
