/* Custom Styles for Learn & Earn Platform */

:root {
    --primary-color: #4361ee;
    --primary-dark: #3651de;
    --secondary-color: #3f37c9;
    --success-color: #06ffa5;
    --warning-color: #ffbe0b;
    --danger-color: #ff006e;
    --info-color: #00b4d8;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #06ffa5 0%, #00d084 100%);
    --gradient-warning: linear-gradient(135deg, #ffbe0b 0%, #ff6b35 100%);
    --gradient-danger: linear-gradient(135deg, #ff006e 0%, #c9184a 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.brand-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 0.95rem;
}

.brand-logo-text {
    line-height: 1.1;
}

.brand-logo-text small {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    opacity: 0.8;
}

.letter-spacing-1 {
    letter-spacing: 0.15rem;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 2px;
}

/* Larger icon size inside primary action buttons */
.btn i.bi {
    font-size: 1.1rem;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding-top: 2rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

/* Button Styles */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.7rem 1.7rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
}

.btn-success {
    background: var(--gradient-success);
}

.btn-warning {
    background: var(--gradient-warning);
    color: white;
}

.btn-danger {
    background: var(--gradient-danger);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Dashboard Stats */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card.primary .stat-icon {
    background: var(--gradient-primary);
    color: white;
}

.stat-card.success .stat-icon {
    background: var(--gradient-success);
    color: white;
}

.stat-card.warning .stat-icon {
    background: var(--gradient-warning);
    color: white;
}

.stat-card.danger .stat-icon {
    background: var(--gradient-danger);
    color: white;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: var(--gradient-primary);
    color: white;
}

.table thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Form Styles */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

/* Badge Styles */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Video Player Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 15px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Timer Display */
.timer-display {
    background: var(--gradient-danger);
    color: white;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 5px 20px rgba(255, 0, 110, 0.3);
}

/* Progress Bar */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
}

.progress-bar {
    background: var(--gradient-success);
    border-radius: 5px;
}

/* Sidebar for Dashboard */
.sidebar {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar .nav-link {
    color: var(--dark-color);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
}

/* Landing Page Hero */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 5rem 0;
    border-radius: 0 0 50px 50px;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.feature-card .feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    .btn,
    footer {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0;
    }
}

/* Footer */
.site-footer {
    background: linear-gradient(160deg, #1a237e 0%, #283593 55%, #3949ab 100%);
    color: #f1f5f9;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    position: relative;
    overflow: hidden;
    margin-top: 5rem;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
    border-top: 3px solid #5e35b1;
}

.site-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(94, 53, 177, 0.4), transparent 55%);
    opacity: 0.8;
    pointer-events: none;
}

.site-footer .footer-divider {
    border-color: rgba(255,255,255,0.1);
}

.site-footer a {
    color: #dbeafe;
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateX(3px);
}

.footer-links a:hover {
    border-left-color: #5e35b1;
    color: #ffffff;
}

.admin-page .site-footer {
    background-color: #1a237e !important; /* Override admin page footer background */
    border-top: 3px solid #1d4ed8;
    box-shadow: 0 -10px 45px rgba(0,0,0,0.45);
}

.admin-page .site-footer,
.admin-page .site-footer .footer-title,
.admin-page .site-footer .footer-links a,
.admin-page .site-footer .footer-contact span,
.admin-page .site-footer .footer-meta small {
    color: #f8fafc;
}

.admin-page .site-footer .footer-links a::before {
    color: rgba(248,250,252,0.45);
}

.admin-page .site-footer .footer-badge {
    background: rgba(37,99,235,0.3);
    border-color: rgba(37,99,235,0.5);
}

.site-footer .footer-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links li {
    margin-bottom: 0.45rem;
}

.footer-links a {
    color: #e0e7ff;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
}

.footer-links a::before {
    content: '•';
    font-size: 1.1rem;
    color: rgba(224,231,255,0.4);
}

.site-footer .footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(94, 53, 177, 0.3), rgba(123, 31, 162, 0.3));
    font-size: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(94, 53, 177, 0.4);
    font-weight: 600;
    color: #ffffff;
}

.footer-stat {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border-radius: 16px;
    padding: 1rem 1.2rem;
    min-width: 150px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.footer-stat:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08));
    transform: translateY(-2px);
}

.footer-stat .label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.25rem;
}

.footer-stat strong {
    color: #ffffff;
    font-size: 1rem;
}

.footer-newsletter .form-control {
    border: none;
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.1));
    color: #f8fafc;
    border: 1px solid rgba(255,255,255,0.2);
}

.footer-newsletter .form-control:focus {
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.15));
    border-color: #5e35b1;
    box-shadow: 0 0 0 0.2rem rgba(94, 53, 177, 0.25);
    color: #ffffff;
}

.footer-newsletter .btn {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
    border: none;
    padding: 0 1.25rem;
    background: linear-gradient(135deg, #5e35b1, #7b1fa2);
    color: #ffffff;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-newsletter .btn:hover {
    background: linear-gradient(135deg, #512da8, #6a1b9a);
    transform: translateY(-1px);
}

.footer-newsletter .form-control::placeholder {
    color: rgba(248,250,252,0.7);
}

.footer-contact span {
    display: block;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0.45rem;
}

.footer-pill {
    background: rgba(99,102,241,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.footer-social a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: linear-gradient(135deg, #5e35b1, #7b1fa2);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(94, 53, 177, 0.4);
}

.footer-meta a {
    color: #dbeafe;
}

.footer-meta span {
    color: rgba(255,255,255,0.8);
}

/* Footer animations */
.site-footer {
    background-color: #1a237e !important; /* Force dark background for footer visibility */
    color: #f1f5f9 !important; /* Ensure white text color */
    animation: footerSlideIn 1s ease-out;
}

@keyframes footerSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer glow effect on hover */
.site-footer:hover {
    box-shadow: 0 -15px 60px rgba(94, 53, 177, 0.5);
}

/* Enhanced footer visibility */
.site-footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #5e35b1, #7b1fa2, #5e35b1);
    animation: footerGlow 3s ease-in-out infinite;
}

@keyframes footerGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
