/* Base styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --menu-text: #ffffff;
    --menu-text-hover: #e9ecef;
    --menu-bg-gradient-start: #4361ee;
    --menu-bg-gradient-end: #7209b7;
    --menu-shadow: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

html {
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin-bottom: 60px;
}

/* Modern Navigation Styles */
.header-sticky {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

    .header-sticky.scrolled {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

.navbar-modern {
    background: linear-gradient(135deg, var(--menu-bg-gradient-start), var(--menu-bg-gradient-end));
    padding: 0.8rem 1rem;
    box-shadow: 0 4px 12px var(--menu-shadow);
    transition: all var(--transition-speed) ease;
}

.navbar-brand-container {
    display: flex;
    align-items: center;
}

.navbar-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

    .navbar-logo:hover {
        transform: scale(1.1);
    }

.navbar-brand {
    color: white !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 1.4rem;
    transition: all var(--transition-speed) ease;
}

    .navbar-brand:hover {
        transform: translateY(-2px);
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    }

.main-nav {
    margin-left: 20px;
}

.navbar-nav .nav-item {
    margin: 0 5px;
    position: relative;
}

.nav-link {
    color: var(--menu-text) !important;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed) ease;
}

    .nav-link i {
        margin-right: 8px;
        font-size: 1.1rem;
        transition: transform 0.3s ease;
    }

    .nav-link:hover {
        color: var(--menu-text-hover) !important;
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
    }

        .nav-link:hover i {
            transform: scale(1.2);
        }

.auth-nav {
    margin-left: auto;
}

.sign-up-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.6rem 1.2rem !important;
    margin-left: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

    .sign-up-btn:hover {
        background-color: white;
        color: var(--menu-bg-gradient-start) !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-3px);
    }

        .sign-up-btn:hover i {
            transform: scale(1.2);
        }

/* Animated underline effect for nav items */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 70%;
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .navbar-collapse {
        background: linear-gradient(135deg, var(--menu-bg-gradient-start), var(--menu-bg-gradient-end));
        border-radius: 8px;
        padding: 10px;
        margin-top: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }

    .nav-link {
        padding: 0.8rem 1rem !important;
        margin: 5px 0;
    }

    .auth-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 10px;
    }

    .sign-up-btn {
        margin-left: 0;
        margin-top: 5px;
        text-align: center;
        display: block;
    }
}

/* Progress bar styling */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    width: 0%;
    transition: width 0.2s ease;
}

/* Loading overlay styling */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.show-loading .loading-overlay {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(67, 97, 238, 0.2);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
/* Responsive adjustments */
@media (max-width: 991px) {
    .navbar-collapse {
        background: linear-gradient(135deg, var(--menu-bg-gradient-start), var(--menu-bg-gradient-end));
        border-radius: 8px;
        padding: 10px;
        margin-top: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
        /* Fix for the collapsed menu display issue */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        /* Ensure proper display when menu is toggled */
        display: none;
    }

        /* Make sure the collapsed menu appears when toggled */
        .navbar-collapse.show,
        .navbar-collapse.collapsing {
            display: block;
        }

    .nav-link {
        padding: 0.8rem 1rem !important;
        margin: 5px 0;
    }

    .auth-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 10px;
    }

    .sign-up-btn {
        margin-left: 0;
        margin-top: 5px;
        text-align: center;
        display: block;
    }
}

/* Navbar Toggler Styling for Better Visibility */
.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.6);
    padding: 0.5rem;
    border-radius: 6px;
    transition: all var(--transition-speed) ease;
}

    .navbar-toggler:hover,
    .navbar-toggler:focus {
        background-color: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.8);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown menu styling */
.navbar .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 0.5rem 0;
}

.navbar .dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

    .navbar .dropdown-item:hover {
        background-color: rgba(0, 123, 255, 0.1);
    }

.navbar .dropdown-divider {
    margin: 0.3rem 0;
}

.navbar .dropdown-toggle::after {
    margin-left: 0.3em;
    vertical-align: 0.15em;
}

.navbar-nav .nav-item.dropdown .nav-link {
    display: flex;
    align-items: center;
}

/* Add a subtle highlight to the user dropdown when active */
.navbar-nav .dropdown.show .dropdown-toggle {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

/* Style for dropdown menu buttons that are actually form buttons */
.navbar .dropdown-item[type="submit"] {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
}
/* Enhanced carousel controls */
.carousel-control-prev,
.carousel-control-next {
    background-color: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        background-color: rgba(0,0,0,0.5);
        opacity: 1;
    }

/* Carousel height settings */
.carousel {
    min-height: 300px; /* Reduced from 400px */
}

.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 300px; /* Reduced from 400px */
}

.carousel-content {
    height: 100%;
    display: flex;
    align-items: center;
}
/* Add these styles to your existing site.css file */

/* Modern Hero Section */
.hero-section {
    background-color: var(--primary-color);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.95;
    z-index: 0;
}

    .hero-background::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    }

.hero-title {
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    font-size: 2.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    opacity: 0.9;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-image-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1.2s ease;
}

.hero-image {
    max-height: 400px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
    transform: translateY(-20px);
    animation: float 6s ease-in-out infinite;
}

/* Stats counter */
.stats-counter {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 1s ease 0.4s both;
}

.counter {
    font-weight: 700;
    color: white;
}

/* Section styling */
.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

    .section-title:after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -15px;
        width: 80px;
        height: 4px;
        background: var(--primary-color);
        transform: translateX(-50%);
        border-radius: 2px;
    }

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
}

/* Modern Welcome Banner for Logged-in Users */
.authenticated-user-banner {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.welcome-heading {
    font-size: 1.8rem;
    font-weight: 700;
}

.welcome-subtitle {
    color: #6c757d;
    font-size: 1.05rem;
}

.accent-text {
    color: var(--primary-color);
}

/* Modern Dashboard for Authenticated Users */
.card-header-custom {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.action-card {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .action-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    }

.action-icon {
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.8;
}

/* Stats card styling */
.stat-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

/* Enhanced Carousel */
.modern-carousel {
    border-radius: 12px;
    overflow: hidden;
}

.carousel-content {
    min-height: 300px;
    display: flex;
    align-items: center;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #4cc9f0 0%, #4895ef 100%);
    color: white;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #2ec4b6 0%, #0077b6 100%);
    color: white;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f8961e 0%, #f3722c 100%);
    color: white;
}

.carousel-icon-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.carousel-icon {
    font-size: 3rem;
    color: white;
}

.carousel-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.carousel-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.carousel-text {
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.9;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-link {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    transition: all 0.3s ease;
}

    .contact-link:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(5px);
        color: white;
    }

.contact-icon {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Modern Feature Cards */
.feature-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

    .feature-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    }

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon {
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-text {
    color: #6c757d;
    margin-bottom: 0;
}

/* Modern Process Flow */
.process-container {
    position: relative;
    padding: 0 15px;
}

    .process-container:before {
        content: '';
        position: absolute;
        top: 40px;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--primary-color);
        opacity: 0.3;
        z-index: 0;
    }

.process-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.process-step {
    flex: 0 0 25%;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 10px;
}

.process-number {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    font-size: 2rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.process-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.process-text {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Modern Subject Cards */
.subject-card {
    padding: 1.5rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

    .subject-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        border-color: var(--primary-color);
    }

.subject-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.subject-card:hover .subject-icon-wrapper {
    background: var(--primary-color);
}

.subject-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.subject-card:hover .subject-icon {
    color: white;
}

.subject-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* Modern Testimonial Card */
.testimonial-card {
    padding: 2.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
}

    .testimonial-card:before {
        content: '\201C';
        font-size: 5rem;
        color: var(--primary-color);
        opacity: 0.1;
        position: absolute;
        top: 10px;
        left: 20px;
        font-family: Georgia, serif;
        line-height: 1;
    }

.testimonial-rating {
    margin-bottom: 1.5rem;
}

    .testimonial-rating i {
        color: #ffc107;
        font-size: 1.2rem;
        margin: 0 2px;
    }

.testimonial-quote {
    font-size: 1.1rem;
    font-style: italic;
    color: #343a40;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
}

.testimonial-info h6 {
    font-weight: 600;
}

.testimonial-info span {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Modern CTA Section */
.cta-section {
    background: var(--primary-color);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-container {
    position: relative;
    z-index: 2;
    padding: 3rem 2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

    .cta-container:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        z-index: -1;
    }

.cta-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-button {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.8rem 2rem;
    background: white;
    color: var(--primary-color);
    border: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

    .cta-button:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
        background: white;
        color: var(--primary-color);
    }

/* Quiz timer styling */
.quiz-timer {
    padding: 5px;
}

#timer {
    font-size: 1.2rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.pulse-animation {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(-20px);
    }

    50% {
        transform: translateY(-30px);
    }

    100% {
        transform: translateY(-20px);
    }
}

/* Reward Alert Styling */
.reward-alert {
    background: linear-gradient(135deg, #fff9c4, #fff176);
    border: none;
    border-left: 8px solid #ffd600;
    box-shadow: 0 10px 25px rgba(255, 214, 0, 0.3);
    animation: slideIn 0.5s ease-out forwards;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    z-index: 1;
}

/* Fast Blinking Animation for Reward Alert */
.flashing {
    animation: fast-blink 0.6s infinite alternate;
}

@keyframes fast-blink {
    0% {
        opacity: 1;
        background: linear-gradient(135deg, #ffee58, #ffeb3b);
        box-shadow: 0 8px 20px rgba(255, 214, 0, 0.5);
    }
    100% {
        opacity: 0.7;
        background: linear-gradient(135deg, #fff9c4, #fff176);
        box-shadow: 0 8px 20px rgba(255, 214, 0, 0.2);
    }
}

/* Add border blinking for extra emphasis */
.reward-alert {
    position: relative;
    animation: border-blink 0.6s infinite alternate;
}

@keyframes border-blink {
    0% {
        border-color: #ffd600;
    }
    100% {
        border-color: #ffab00;
    }
}

/* Blinking icon animation */
.reward-alert i.bi-stars {
    animation: icon-blink 0.6s infinite alternate;
}

@keyframes icon-blink {
    0% {
        transform: scale(1);
        color: #ff9500;
    }
    100% {
        transform: scale(1.2);
        color: #ff6d00;
    }
}

/* Enhanced background pattern for yellow alert */
.reward-alert::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffd600' fill-opacity='0.15' fill-rule='evenodd'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
    opacity: 1;
}

/* Add a yellow border glow */
.reward-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(255, 214, 0, 0.5);
    border-radius: 8px;
    box-shadow: inset 0 0 15px rgba(255, 214, 0, 0.2);
    z-index: -1;
    pointer-events: none;
}

/* Updated flashing animation with yellow theme */
.flashing {
    animation: yellow-flash 2.5s infinite alternate;
}

@keyframes yellow-flash {
    0% {
        box-shadow: 0 8px 20px rgba(255, 214, 0, 0.3);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 15px 35px rgba(255, 214, 0, 0.5);
        transform: translateY(-3px);
        background: linear-gradient(135deg, #ffee58, #ffeb3b);
    }
    100% {
        box-shadow: 0 8px 20px rgba(255, 214, 0, 0.3);
        transform: translateY(0);
    }
}

/* Updated text styling for better contrast on yellow background */
.reward-alert .reward-text {
    position: relative;
    width: 100%;
    z-index: 2;
    line-height: 1.7;
    background-color: rgba(255, 255, 255, 0.6);
    padding: 0.75rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.reward-alert strong {
    font-size: 1.4rem;
    color: #ff0000 !important; /* Changed to bright red from #ff8f00 */
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.3);
    animation: text-blink 2s infinite alternate;
}

/* Animation for blinking text that matches the star's animation */
@keyframes text-blink {
    0% {
        opacity: 1;
        transform: scale(1);
        color: #ff0000;
        text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.05);
        color: #ff3d00;
        text-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .reward-alert {
        padding: 1.25rem;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        border-radius: 0;
        border-left-width: 6px;
    }
    
    .reward-alert strong {
        font-size: 1.2rem;
    }
    
    .reward-alert .reward-text {
        padding: 0.5rem;
    }
    
    .reward-alert i.bi-stars {
        font-size: 1.8rem !important;
    }
}

/* Enhanced Alert Styling */
.alert {
    position: relative;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    animation: slideInDown 0.4s ease forwards;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    
}

/* Slide-in animation for alerts */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Individual alert types with enhanced gradients and left borders */
.alert-success {
    background: linear-gradient(to right, rgba(40, 167, 69, 0.08) 0%, rgba(40, 167, 69, 0.01) 100%);
    border-left: 5px solid #28a745;
    color: #1e7e34;
}

.alert-danger {
    background: linear-gradient(to right, rgba(220, 53, 69, 0.08) 0%, rgba(220, 53, 69, 0.01) 100%);
    border-left: 5px solid #dc3545;
    color: #bd2130;
}

.alert-info {
    background: linear-gradient(to right, rgba(23, 162, 184, 0.08) 0%, rgba(23, 162, 184, 0.01) 100%);
    border-left: 5px solid #17a2b8;
    color: #117a8b;
}

.alert-warning {
    background: linear-gradient(to right, rgba(255, 193, 7, 0.08) 0%, rgba(255, 193, 7, 0.01) 100%);
    border-left: 5px solid #ffc107;
    color: #d39e00;
}

.alert-primary {
    background: linear-gradient(to right, rgba(0, 123, 255, 0.08) 0%, rgba(0, 123, 255, 0.01) 100%);
    border-left: 5px solid #007bff;
    color: #0062cc;
}

/* Enhanced icon styling */
.alert i {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.alert-success i {
    color: #28a745;
}

.alert-danger i {
    color: #dc3545;
}

.alert-info i {
    color: #17a2b8;
}

.alert-warning i {
    color: #ffc107;
}

.alert-primary i {
    color: #007bff;
}

/* Close button styling */
.alert .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.alert .btn-close:hover {
    opacity: 1;
}

/* Alert spacing and subtle hover effect */
.alert:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Ensure text is readable with good contrast */
.alert {
    line-height: 1.6;
}

/* Make alerts more prominent on mobile */
@media (max-width: 768px) {
    .alert {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        border-radius: 0;
    }
}

/* Updated reward alert structure to ensure reward-text takes full width */
.reward-alert .d-flex {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
}

.reward-alert i.bi-stars {
    margin-bottom: 1rem;
    align-self: center;
    font-size: 2.2rem;
    display: block;
}

.reward-alert .reward-text {
    width: 100%;
    box-sizing: border-box;
    text-align: left; /* Changed from center to left */
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
}

/* Update the animation for the text */
.reward-alert .reward-text {
    
    animation: highlight-pulse 3s infinite ease-in-out;
}

@keyframes highlight-pulse {
    0% { background-color: rgba(255, 255, 255, 0.7); }
    50% { background-color: rgba(255, 248, 225, 0.85); }
    100% { background-color: rgba(255, 255, 255, 0.7); }
}

/* Make star icon more prominent and red */
.reward-alert i.bi-stars {
    font-size: 3rem !important; /* Increased from 2.2rem */
    color: #ff0000 !important; /* Changed to bright red */
    margin-bottom: 1rem;
    align-self: center;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5)); /* Red glow effect */
    animation: star-pulse 1s infinite alternate;
}

/* Special animation for the red star */
@keyframes star-pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
    }
    100% {
        transform: scale(1.3);
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.8));
    }
}

/* Override the previous icon-blink animation to use our new star-pulse */
.reward-alert i.bi-stars {
    animation: star-pulse 1s infinite alternate;
}

.reward-badge {
    font-size: 0.95rem;
}

.reward-badge .badge {
    font-size: 0.9rem;
    padding: 0.35rem 0.65rem;
}