/* =============================================
   DARK 3D THEME OVERRIDE - Math Platform
   Loaded AFTER style.css to override light theme
   with dark cosmic theme matching homepage
   ============================================= */

/* Override CSS Variables for Dark Theme */
:root {
    --background-color: #050a1a;
    --card-bg: rgba(15, 23, 42, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: rgba(148, 163, 184, 0.85);
    --text-light: rgba(203, 213, 225, 0.9);
    --border-color: rgba(59, 130, 246, 0.15);
    --background-light: rgba(59, 130, 246, 0.08);
    --primary-soft: rgba(59, 130, 246, 0.12);
    --secondary-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.6);
    --shadow-colored: 0 10px 30px rgba(59, 130, 246, 0.2);
    --glass-bg: rgba(10, 15, 30, 0.7);
    --glass-border: 1px solid rgba(59, 130, 246, 0.15);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Body */
body {
    background: #050a1a !important;
    color: #f1f5f9;
}

/* 3D Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Navigation Override */
.main-nav {
    background: rgba(5, 10, 26, 0.75) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15) !important;
}

.nav-buttons {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
}

.nav-btn {
    color: rgba(148, 163, 184, 0.9) !important;
}

.nav-btn:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    box-shadow: none !important;
}

.nav-btn.active {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    box-shadow: none !important;
}

.nav-btn.home-btn {
    background: rgba(59, 130, 246, 0.25) !important;
    color: #93c5fd !important;
}

.nav-btn.home-btn:hover {
    background: rgba(59, 130, 246, 0.4) !important;
}

.logo span {
    color: #60a5fa !important;
}

.logo i {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
}

.mobile-toggle {
    color: #60a5fa !important;
    background: rgba(59, 130, 246, 0.15) !important;
}

/* Cards Override */
.feature-card,
.quick-card,
.glass-card,
.math-input-area,
.tutor-profile,
.profile-container {
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-card:hover,
.quick-card:hover,
.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2) !important;
}

.feature-icon,
.quick-icon {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
}

.feature-card:hover .feature-icon,
.quick-card:hover .quick-icon {
    background: rgba(59, 130, 246, 0.3) !important;
}

.quick-arrow {
    background: rgba(59, 130, 246, 0.1) !important;
}

.quick-arrow i {
    color: #94a3b8 !important;
}

.quick-card:hover .quick-arrow {
    background: rgba(59, 130, 246, 0.3) !important;
}

.quick-card:hover .quick-arrow i {
    color: #f1f5f9 !important;
}

/* Text Colors */
.section-header h2 {
    color: #f1f5f9 !important;
}

.section-header i {
    color: #60a5fa !important;
}

.profile-name {
    color: #f1f5f9 !important;
}

.profile-title {
    color: #60a5fa !important;
}

.academic-statement {
    color: rgba(203, 213, 225, 0.85) !important;
}

.academic-statement strong {
    color: #93c5fd !important;
}

.feature-card h3,
.quick-card h3 {
    color: #f1f5f9 !important;
}

.feature-card p,
.quick-card p {
    color: rgba(148, 163, 184, 0.85) !important;
}

/* Contact Section */
.contact-section {
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
}

.contact-item {
    background: rgba(59, 130, 246, 0.08) !important;
}

.contact-item:hover {
    border-color: rgba(59, 130, 246, 0.3) !important;
    background: rgba(59, 130, 246, 0.15) !important;
}

.contact-item span {
    color: #e2e8f0 !important;
}

/* Footer Override */
.main-footer {
    background: rgba(5, 10, 26, 0.9) !important;
    border-top: 1px solid rgba(59, 130, 246, 0.1) !important;
}

/* Hero Section */
.hero-section {
    background: transparent !important;
}

/* Profile */
.profile-image {
    border: 3px solid rgba(59, 130, 246, 0.3) !important;
    background: rgba(15, 23, 42, 0.7) !important;
}

/* Top Bar */
.top-bar {
    background: rgba(5, 10, 26, 0.9) !important;
}

/* Watermark */
.watermark {
    color: rgba(59, 130, 246, 0.03) !important;
}

/* Inputs / Textareas */
.math-textarea,
input[type="text"],
input[type="number"],
select,
textarea {
    background: rgba(15, 23, 42, 0.8) !important;
    color: #f1f5f9 !important;
    border-color: rgba(59, 130, 246, 0.15) !important;
}

.math-textarea:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Buttons */
.btn-primary,
.btn-action {
    background: linear-gradient(135deg, #1e40af, #3b82f6) !important;
}

/* Modal Override */
.modal-content {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

/* Resource Viewer Header Fix */
.viewer-header {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}

.viewer-header h2 {
    color: #f1f5f9 !important;
}

.viewer-modal {
    background: rgba(5, 10, 26, 0.95) !important;
}

.viewer-content {
    background: rgba(15, 23, 42, 0.9) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(5, 10, 26, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}