/* General Body and Theming */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e0e0e0; /* Lighter text for dark background */
    background-color: #1a1a1a; /* Fallback dark background */
}

.main-background {
    background: linear-gradient(135deg, #4b0082, #0000ff, #00ffff);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hr-white {
    border-top: 1px solid #fff;
    opacity: 0.2; /* Softer white line */
}

/* Custom Button Styles */
.custom-btn {
    background-color: #8a2be2;
    border: 2px solid #8a2be2;
    color: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.custom-btn:hover {
    background-color: #9932cc;
    border-color: #9932cc;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(153, 50, 204, 0.5);
}

.custom-btn-outline {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.custom-btn-outline:hover {
    background-color: #fff;
    color: #4b0082;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* Form and Card Styles */
.form-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
}

.form-container .form-control {
    background: rgba(255, 255, 255, 0.15); /* Slightly more opaque */
    border: none;
    border-radius: 10px;
    color: #fff;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-container .form-control::placeholder {
    color: #bbb; /* Darker placeholder */
}

.form-container .form-control:focus {
    background: rgba(255, 255, 255, 0.25); /* More opaque on focus */
    box-shadow: 0 0 0 0.25rem rgba(138, 43, 226, 0.25); /* Purple glow */
    color: #fff;
    border-color: #8a2be2;
}

.form-container .form-label {
    color: #fff;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Profile Avatars */
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Dashboard Sidebar */
.sidebar {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 20px;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
}

.sidebar .nav-link {
    color: #fff;
    padding: 15px;
    margin: 5px 0;
    border-radius: 10px;
    transition: background-color 0.3s, transform 0.3s;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.sidebar .nav-link i {
    margin-right: 10px;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Navbar */
.navbar {
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent dark background */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    padding-bottom: 15px;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.9); /* Darker when scrolled */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.8rem;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #8a2be2; /* Accent color on hover */
}

.navbar .btn {
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 25px; /* More rounded buttons */
    padding: 8px 20px;
}

.navbar .btn-outline-light {
    border-color: #8a2be2;
    color: #8a2be2;
}

.navbar .btn-outline-light:hover {
    background-color: #8a2be2;
    color: #fff;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

.navbar .btn-primary {
    background-color: #8a2be2;
    border-color: #8a2be2;
    color: #fff;
}

.navbar .btn-primary:hover {
    background-color: #9932cc;
    border-color: #9932cc;
    box-shadow: 0 4px 15px rgba(153, 50, 204, 0.4);
}

.navbar .btn-success {
    background-color: #fd1d1d;
    border-color: #fd1d1d;
    color: #fff;
}

.navbar .btn-success:hover {
    background-color: #e01a1a; /* Slightly darker red */
    border-color: #e01a1a;
    box-shadow: 0 4px 15px rgba(253, 29, 29, 0.4);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    padding-top: 80px; /* Account for fixed navbar */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(75, 0, 130, 0.8), rgba(0, 0, 255, 0.8), rgba(0, 255, 255, 0.8));
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
    background: rgba(26, 26, 26, 0.8); /* More solid background with transparency */
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #8a2be2;
    max-width: 800px; /* Limit width for better readability */
}

.hero-section .container:hover {
    transform: translateY(-5px); /* Less aggressive lift */
    box-shadow: 0 15px 30px rgba(138, 43, 226, 0.4); /* Softer shadow */
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px); /* More pronounced animation */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section h1 {
    animation: fadeInDown 1s ease-in-out;
    font-weight: 800; /* Bolder heading */
    color: #fff;
    text-shadow: 
        0 4px 6px rgba(0,0,0,.4), /* Modern shadow */
        0 0 15px rgba(138, 43, 226, 0.6); /* Glow effect */
    font-size: 3.5rem; /* Larger heading */
    margin-bottom: 20px;
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: #e0e0e0;
}

.cta-buttons .btn {
    margin: 10px;
    min-width: 180px;
}

.btn-gradient {
    background: linear-gradient(45deg, #8a2be2, #0000ff); /* Consistent gradient */
    border: none;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    opacity: 0.9;
}

/* Student Registration Section */
#student-registration {
    background-color: #1a1a1a;
    padding: 80px 0;
    color: #fff;
}

#student-registration h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.registration-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.btn-gradient-category {
    background: linear-gradient(45deg, #007bff, #00c6ff);
    border: none;
    color: #fff;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    min-width: 200px;
    text-decoration: none;
}

.btn-gradient-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    opacity: 0.9;
    color: #fff;
}

/* Teacher Registration Section */
#teacher-registration {
    background-color: #222;
    padding: 60px 0;
    color: #fff;
}

.btn-gradient-teacher {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    color: #fff;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    text-decoration: none;
}

.btn-gradient-teacher:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.4);
    opacity: 0.9;
    color: #fff;
}

/* Features Section */
#features {
    background-color: #1a1a1a;
    padding: 80px 0;
    color: #fff;
}

#features h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 700;
}

.feature-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    height: 100%; /* Ensure cards have equal height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
    border-color: #8a2be2;
}

.feature-card i {
    color: #8a2be2; /* Accent color for icons */
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.feature-card h5 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* How It Works Section */
#how-it-works {
    background-color: #222;
    padding: 80px 0;
    color: #fff;
}

#how-it-works h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 700;
}

.step {
    padding: 30px;
    text-align: center;
    position: relative;
}

.step-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #8a2be2, #0000ff);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 25px auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.step h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.step p {
    font-size: 1.1rem;
    color: #ccc;
}

/* Tutors Section */
#tutors {
    background-color: #1a1a1a;
    padding: 80px 0;
    color: #fff;
}

#tutors h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 700;
}

.tutor-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    height: 100%;
}

.tutor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
    border-color: #8a2be2;
}

.tutor-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tutor-info {
    padding: 20px;
}

.tutor-info h5 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.tutor-info p {
    color: #ccc;
    margin-bottom: 10px;
}

.tutor-card .rating {
    color: #ffc107; /* Star color */
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.btn-view-profile {
    background-color: #8a2be2;
    border: none;
    color: #fff;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
}

.btn-view-profile:hover {
    background-color: #9932cc;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
    color: #fff;
}

/* Testimonials Section */
#testimonials {
    background-color: #222;
    padding: 80px 0;
    color: #fff;
}

#testimonials h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 700;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin: 0 auto;
    max-width: 700px;
}

.testimonial-card p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 25px;
    font-style: italic;
    color: #e0e0e0;
}

.testimonial-card cite {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #8a2be2;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(138, 43, 226, 0.7);
    border-radius: 50%;
    padding: 15px;
}

/* CTA Section */
#cta {
    background: linear-gradient(90deg, #8a2be2, #0000ff);
    padding: 80px 0;
    color: #fff;
    text-align: center;
}

#cta h2 {
    font-size: 2.8rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.btn-cta {
    background-color: #fff;
    color: #8a2be2;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-decoration: none;
}

.btn-cta:hover {
    background-color: #f0f0f0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    color: #9932cc;
}

/* Footer */
footer {
    background-color: #0a0a0a;
    padding: 40px 0 20px 0;
    color: #aaa;
    font-size: 0.9rem;
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.social-icons a {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #8a2be2;
}

.newsletter-form {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.newsletter-form input[type="email"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 10px 20px;
    color: #fff;
    width: 300px;
    max-width: 80%;
}

.newsletter-form input[type="email"]::placeholder {
    color: #bbb;
}

.newsletter-form .btn-gradient {
    padding: 10px 25px;
    border-radius: 25px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .registration-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .btn-gradient-category, .btn-gradient-teacher {
        width: 90%;
        max-width: 300px;
    }
    .feature-card, .tutor-card, .testimonial-card {
        margin-bottom: 20px;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding-bottom: 0;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .sidebar .nav-link {
        text-align: center;
        justify-content: center;
    }
    .sidebar .nav-link i {
        margin-right: 0;
        display: block;
        margin-bottom: 5px;
    }
    .sidebar-footer {
        position: relative;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 15px;
    }
    .newsletter-form {
        flex-direction: column;
    }
    .newsletter-form input[type="email"] {
        width: 90%;
        margin-bottom: 10px;
    }
}

/* General Card Styling for Dashboards */
.card {
    background: rgba(255, 255, 255, 0.08); /* Lighter transparent background */
    backdrop-filter: blur(8px); /* Slightly less blur */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Softer border */
    border-radius: 12px; /* Slightly more rounded corners */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.3); /* Accent shadow on hover */
}

.card-header {
    background-color: rgba(0, 0, 0, 0.2); /* Darker header */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.card-title {
    color: #fff;
    font-weight: 700;
}

.list-group-item {
    background-color: rgba(255, 255, 255, 0.05) !important; /* Lighter list item background */
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0;
}

/* DataTables specific styling */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #e0e0e0 !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e0e0e0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #8a2be2 !important;
    border-color: #8a2be2 !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(138, 43, 226, 0.5) !important;
    border-color: rgba(138, 43, 226, 0.5) !important;
    color: #fff !important;
}

.table-dark th, .table-dark td {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Alerts */
.alert {
    border-radius: 8px;
    font-weight: 500;
}
.alert-success {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}
.alert-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
.alert-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}
.alert-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529; /* Dark text for warning */
}

/* Badges */
.badge {
    padding: 0.5em 0.7em;
    border-radius: 0.375rem;
    font-size: 0.85em;
    font-weight: 600;
}

/* Progress Bar */
.progress {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
}
.progress-bar {
    background-color: #8a2be2; /* Accent color for progress */
}

/* Specific dashboard card adjustments */
.card.text-white.text-center .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 25px;
}

.card.text-white.text-center .card-body i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: #00c6ff; /* A different accent for icons */
}

.card.text-white.text-center .card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.card.text-white.text-center .card-text {
    font-size: 1rem;
    color: #ccc;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
}

/* Tab navigation for applications page */
.nav-tabs .nav-link {
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    background-color: rgba(255, 255, 255, 0.05);
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.nav-tabs .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.tab-content .card {
    border-top-left-radius: 0;
}

/* Rating stars in feedback */
.rating label {
    color: #ccc;
    transition: color 0.2s;
    font-size: 2.5rem;
}
.rating input:checked ~ label, .rating label:hover, .rating label:hover ~ label {
    color: #ffc107;
}