/* LearnBit.pro Custom Styles */

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #ffffff;
    padding-top: 76px; /* Account for fixed navbar */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

/* Navigation Styles */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(30, 58, 138, 0.95) !important;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Cards and Components */
.tool-card, .blog-card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    overflow: hidden;
}

.tool-card:hover, .blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.shadow-hover {
    box-shadow: var(--shadow-md);
}

.shadow-hover:hover {
    box-shadow: var(--shadow-xl);
}

.tool-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in.delay-1 {
    animation-delay: 0.2s;
}

.fade-in.delay-2 {
    animation-delay: 0.4s;
}

.fade-in.delay-3 {
    animation-delay: 0.6s;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
    opacity: 0;
}

/* Form Styles */
.form-control {
    border-radius: 10px;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Tool Specific Styles */
.quiz-container, .calculator-container, .planner-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin: 2rem 0;
}

.quiz-question {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.quiz-option {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    border-color: var(--secondary-color);
    background: rgba(59, 130, 246, 0.05);
}

.quiz-option.selected {
    border-color: var(--secondary-color);
    background: rgba(59, 130, 246, 0.1);
}

.result-display {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

/* Calculator Styles */
.calc-input {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.calc-result {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

/* Progress Bars */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: var(--light-color);
}

.progress-bar {
    border-radius: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #ffffff 0%, #B3D9FF 100%) !important;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #ffffff !important;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    color: white !important;
}

/* Back to Top Button */
#backToTop {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: none;
    transition: all 0.3s ease;
    background-color: var(--accent-color);
    color: white;
    border: none;
}

#backToTop:hover {
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        text-align: center;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .tool-card, .blog-card {
        margin-bottom: 1.5rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .quiz-container, .calculator-container, .planner-container {
        padding: 1rem;
        margin: 1rem 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Loading Spinner */
.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-pattern {
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(255,255,255,0.2) 2px, transparent 0),
        radial-gradient(circle at 75px 75px, rgba(255,255,255,0.2) 2px, transparent 0);
    background-size: 100px 100px;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Print Styles */
@media print {
    .navbar, footer, #backToTop, .dark-mode-toggle {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .container {
        max-width: none;
    }
}
@media (max-width: 992px) {
    .dropdown-menu {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    .dropdown-menu .dropdown-header {
        position: sticky;
        top: 0;
        background: #f8f9fa;
        z-index: 1;
        padding: 0.75rem 1rem 0.5rem;
        font-weight: 600;
    }
    .dropdown-menu .dropdown-item {
        white-space: normal;
        padding: 0.5rem 1rem;
    }
}