/* Antigravity Design System: Premium Light Slate & Royal Indigo Palette */

:root {
    --bg-dark-depth: #f8fafc; /* Clean slate light backdrop */
    --bg-dark-card: #ffffff; /* Solid white card background */
    --border-glass: rgba(15, 23, 42, 0.08); /* Soft slate border */
    --border-glass-hover: rgba(15, 23, 42, 0.16);
    
    --color-primary: #2563eb; /* High-contrast Royal Blue */
    --color-secondary: #7c3aed; /* Royal Violet */
    --color-success: #059669; /* Emerald Green */
    --color-warning: #d97706; /* Amber Gold */
    --color-danger: #dc2626; /* Crimson Red */
    
    --text-muted: #64748b; /* Slate-500 text-muted */
    --text-light: #0f172a; /* Slate-900 main text */
}

body {
    background-color: var(--bg-dark-depth);
    font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-light);
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-muted) !important;
}

/* Gradients optimized for light backgrounds */
.text-primary-gradient {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-primary-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%) !important;
}

.bg-accent-gradient {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

.bg-warning-gradient {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

.bg-card-gradient {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%) !important;
}

/* Glassmorphism optimized for Light backgrounds */
.glass-navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.glass-card {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass) !important;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03) !important;
}

.glass-card:hover {
    border-color: var(--border-glass-hover) !important;
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.03) !important;
}

.dropdown-glass {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass) !important;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
}
.dropdown-glass .dropdown-item {
    color: var(--text-light) !important;
    transition: all 0.2s ease;
}
.dropdown-glass .dropdown-item:hover {
    background: rgba(15, 23, 42, 0.05) !important;
    color: var(--color-primary) !important;
}

/* Premium Light Buttons */
.btn-primary-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border: none;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.15);
}
.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
    color: white !important;
}

.btn-glass {
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--text-light) !important;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
}
.btn-glass:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    border-color: var(--border-glass-hover) !important;
    color: var(--color-primary) !important;
}

.btn-glass-profile {
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--text-light) !important;
    border-radius: 30px;
    padding: 6px 16px;
    transition: all 0.2s ease;
}
.btn-glass-profile:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    color: var(--color-primary) !important;
}

/* Interactive Elements */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--text-muted) !important;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.social-link:hover {
    background: var(--color-primary) !important;
    color: white !important;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.text-muted-hover {
    transition: color 0.2s ease;
}
.text-muted-hover:hover {
    color: var(--color-primary) !important;
}

/* Form Controls Customization for Light Theme */
.form-control, .form-select {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 8px;
}
.form-control:focus, .form-select:focus {
    background-color: #ffffff !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    color: #0f172a !important;
}
.form-control::placeholder {
    color: #94a3b8 !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Custom Badges */
.badge-glass-distress {
    background: rgba(220, 38, 38, 0.1) !important;
    border: 1px solid rgba(220, 38, 38, 0.25) !important;
    color: #dc2626 !important;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.badge-glass-yield {
    background: rgba(5, 150, 105, 0.1) !important;
    border: 1px solid rgba(5, 150, 105, 0.25) !important;
    color: #059669 !important;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Typography & Hero section style */
.tracking-tight {
    letter-spacing: -0.03em;
}
.text-shadow-sm {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Premium Light Mode Alert Panels */
.alert {
    background: #ffffff !important;
    backdrop-filter: none;
    border: 1px solid var(--border-glass) !important;
    color: #0f172a !important;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.alert-success {
    border-color: rgba(5, 150, 105, 0.2) !important;
    color: #065f46 !important;
    background: rgba(5, 150, 105, 0.05) !important;
}
.alert-danger {
    border-color: rgba(220, 38, 38, 0.2) !important;
    color: #991b1b !important;
    background: rgba(220, 38, 38, 0.05) !important;
}
.alert-warning {
    border-color: rgba(217, 119, 6, 0.2) !important;
    color: #92400e !important;
    background: rgba(217, 119, 6, 0.05) !important;
}
.alert-info {
    border-color: rgba(37, 99, 235, 0.2) !important;
    color: #1e40af !important;
    background: rgba(37, 99, 235, 0.05) !important;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.1);
    border-radius: 4px;
    transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Table Text Wrap Corrections */
.table th, .table td {
    white-space: nowrap;
    vertical-align: middle;
    padding: 14px 16px;
    color: var(--text-light) !important;
}
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-glass) !important;
    background: #ffffff !important;
}

/* Button & Form Focus Micro-Interactions */
.btn:active {
    transform: scale(0.98);
}
.form-check-input:checked {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

/* Global Hardcoded Class Overrides (Maps Obsidian elements to Light Theme equivalents) */
.bg-dark-depth {
    background-color: var(--bg-dark-depth) !important;
}

.bg-dark-card {
    background-color: var(--bg-dark-card) !important;
}

.bg-dark {
    background-color: #ffffff !important;
}

input.bg-dark, select.bg-dark, textarea.bg-dark {
    background-color: #ffffff !important;
}

.text-light {
    color: #1e293b !important; /* Dark Slate-800 instead of white */
}

/* Selector to override .text-white text globally, except inside buttons, badges, alerts and gradients */
.text-white:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.alert *):not(.bg-primary-gradient *):not(.bg-accent-gradient *):not(.bg-warning-gradient *) {
    color: #0f172a !important;
}

.border-secondary {
    border-color: var(--border-glass) !important;
}

/* Markdown formatting overrides for Light Theme */
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
    color: #0f172a !important;
    font-weight: 700;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
}
.markdown-body h1 { font-size: 2.2rem; }
.markdown-body h2 { font-size: 1.8rem; }
.markdown-body h3 { font-size: 1.4rem; }
.markdown-body p {
    color: #334155 !important; /* highly readable slate text */
    margin-bottom: 1.2em;
}
.markdown-body ul, .markdown-body ol {
    margin-bottom: 1.5em;
    padding-left: 24px;
}
.markdown-body li {
    color: #334155 !important;
    margin-bottom: 0.6em;
}
.markdown-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.8em;
    border-collapse: collapse;
}
.markdown-body th, .markdown-body td {
    border: 1px solid var(--border-glass);
    padding: 12px;
    text-align: left;
    white-space: normal !important; /* Override wrap rule for long text inside articles */
}
.markdown-body th {
    background-color: rgba(15, 23, 42, 0.04) !important;
    color: #0f172a !important;
}

/* Global Component Light Theme Overrides */
.modal-content {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--text-light) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.modal-header, .modal-footer {
    border-color: var(--border-glass) !important;
}

.card {
    background-color: var(--bg-dark-card) !important;
    border: 1px solid var(--border-glass) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid var(--border-glass) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05) !important;
}

.dropdown-item {
    color: var(--text-light) !important;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(15, 23, 42, 0.05) !important;
    color: var(--color-primary) !important;
}
