/* ===== MEXANIKA ONLINE CUSTOM STYLES ===== */

/* Variables */
:root {
    --primary-color: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --border-radius: 10px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Dark theme variables */
[data-bs-theme="dark"] {
    --primary-color: #4dabf7;
    --light-color: #343a40;
    --dark-color: #f8f9fa;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    padding-top: 76px; /* Fixed navbar height */
    background-color: var(--bs-body-bg);
    transition: var(--transition);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* Container ichidagi h1 uchun */
.container h1,
.container-fluid h1 {
    display: block;
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
        line-height: 1.4;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.25rem;
        line-height: 1.3;
    }
}

.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), #4dabf7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-hover-effect {
    position: relative;
    overflow: hidden;
}

.card-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.card-hover-effect:hover::before {
    left: 100%;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #4dabf7);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #339af0);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 1px solid #dde2e5;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

.progress-sm {
    height: 6px;
}

.progress-lg {
    height: 12px;
}

/* Badges */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
}

.badge-difficulty-easy {
    background: linear-gradient(45deg, #28a745, #34ce57);
    color: white;
}

.badge-difficulty-medium {
    background: linear-gradient(45deg, #ffc107, #ffcd39);
    color: #212529;
}

.badge-difficulty-hard {
    background: linear-gradient(45deg, #dc3545, #e55353);
    color: white;
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transition: var(--transition);
}

.stat-card:hover::before {
    top: -60%;
    right: -60%;
}

.stat-card .stat-icon {
    font-size: 3rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Topic Cards */
.topic-card {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: var(--transition);
}

.topic-card:hover {
    border-left-color: #4dabf7;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.topic-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #4dabf7);
    transition: width 0.6s ease;
}

/* Problem Cards */
.problem-card {
    position: relative;
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.problem-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.problem-type-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.problem-type-calculation {
    background: linear-gradient(45deg, #28a745, #34ce57);
}

.problem-type-theory {
    background: linear-gradient(45deg, #17a2b8, #20c997);
}

.problem-type-analysis {
    background: linear-gradient(45deg, #6f42c1, #8662d4);
}

.problem-type-graph {
    background: linear-gradient(45deg, #fd7e14, #fd9843);
}

/* Alert Messages */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Math Formula Styles */
.formula-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
    position: relative;
}

.formula-container::before {
    content: '📐';
    position: absolute;
    top: -10px;
    left: 15px;
    background: white;
    padding: 0 5px;
    font-size: 1.2rem;
}

/* Dark Theme Support */
[data-bs-theme="dark"] .topic-card {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .problem-card {
    background: var(--bs-body-bg);
    border: 1px solid #495057;
}

[data-bs-theme="dark"] .formula-container {
    background: #343a40;
    border-color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card .stat-number {
        font-size: 2rem;
    }
    
    body {
        padding-top: 66px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-color), #4dabf7);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0056b3, #339af0);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(45deg, var(--primary-color), #4dabf7) 1;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4dabf7 100%);
}

/* ===== MODERN FOOTER STYLES ===== */
.footer-modern {
    background: #1a1d29;
    position: relative;
}

.footer-brand h4 {
    color: #ffffff;
}

.footer-brand p {
    color: #e2e8f0 !important;
}

.footer-modern h6 {
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links {
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    opacity: 0.8;
}

.footer-links a:hover {
    color: #667eea;
    transform: translateX(5px);
    opacity: 1;
}

.footer-links a i {
    font-size: 0.7rem;
    opacity: 0.8;
    color: #667eea;
}

.footer-contact {
    padding: 0;
    margin: 0;
}

.footer-contact li {
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-contact a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0.9;
}

.footer-contact a:hover {
    color: #667eea;
    opacity: 1;
}

.footer-contact span {
    color: #ffffff;
    opacity: 0.9;
}

.footer-contact i {
    font-size: 1rem;
}

.social-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.social-btn:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.footer-bottom p {
    color: #e2e8f0;
}

.footer-bottom .text-white {
    color: #ffffff !important;
}

.footer-bottom small {
    color: #e2e8f0;
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-modern .col-lg-4,
    .footer-modern .col-lg-2,
    .footer-modern .col-lg-3 {
        margin-bottom: 2rem;
    }
    
    .footer-modern h6 {
        margin-top: 1rem;
    }
}

