/* --- CSS VARIABLES FOR THE DESIGN SYSTEM --- */
:root {
    --primary-color: #0061a8;
    --primary-gradient: linear-gradient(45deg, #0056b3 0%, #007bff 100%);
    --secondary-color: #0b2545; /* Used for titles and text */
    --bg-main: #f9fcff;
    --bg-accent: #eef7ff;
    --bg-white: #ffffff;
    --text-dark: #212529;
    --text-light: #6c757d;
    --shadow-soft: 0 8px 25px rgba(0, 0, 0, 0.06);
    --shadow-strong: 0 10px 30px rgba(0, 97, 168, 0.2);
    --border-radius: 16px;
}

/* --- GLOBAL & SMOOTH SCROLL --- */
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Baloo Da 2', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-weight: 500;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex-grow: 1;
}

/* --- KEYFRAME ANIMATION (Used by both buttons) --- */
@keyframes button-glow {
    0% { box-shadow: 0 0 8px rgba(0, 123, 255, 0.4); }
    50% { box-shadow: 0 0 24px 5px rgba(0, 123, 255, 0.7); }
    100% { box-shadow: 0 0 8px rgba(0, 123, 255, 0.4); }
}


/* --- MOBILE-FIRST STYLES (Default) --- */

/* General Section Padding */
main section {
    padding: 30px 0;
}

/* Header & Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    padding: 5px 0px 20px 0px;
}
.header-logo {
    max-height: 60px !important;
}
.navbar-toggler {
    border: none;
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 2px var(--primary-color);
}
.navbar-nav {
    text-align: center;
    padding-top: 1rem;
}
.navbar-nav .nav-link {
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.nav-link-highlight {
    background: var(--primary-gradient);
    color: var(--bg-white) !important;
    animation: button-glow 2.5s infinite ease-in-out;
    transition: filter 0.3s ease;
}
.nav-link-highlight:hover {
    color: var(--bg-white) !important;
    filter: brightness(1.1);
}


/* Hero Section */
.hero-section-image {
    padding: 0;
}
.hero-section-image img {
    width: 100%;
}


/* Section Title */
.section-title {
    font-weight: 800;
    font-size: 2rem;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 15px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Rule Items Style */
.rules-list {
    padding-left: 0;
}
.rule-item {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
.rule-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.rule-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-gradient);
}
.rule-item p {
    margin-bottom: 0;
    margin-left: 15px;
}
.rule-number {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    background: var(--primary-gradient);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

/* --- CHANGE: CONSOLIDATED ALL BUTTON STYLES HERE --- */

/* Main "অংশগ্রহণ করুন" Button */
.btn-participate {
    background: var(--primary-gradient);
    color: var(--bg-white);
    font-weight: 700;
    border-radius: 50px;
    padding: 12px 30px;
    border: none;
    transition: all 0.3s ease;
    animation: button-glow 2.5s infinite ease-in-out;
}
.btn-participate:hover {
    color: var(--bg-white);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Gradient Button (Used on Success & Login Pages) */
.btn-gradient {
    background: var(--primary-gradient);
    color: var(--bg-white);
    border: none;
    font-weight: 700;
    border-radius: 50px; /* Default pill shape */
    transition: all 0.3s ease;
}
.btn-gradient:hover {
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}


/* Banner/Placeholder Styles */
.section-banner {
    height: 100px;
    background-color: #e9ecef;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}
.section-banner::after {
    content: 'Banner Placeholder';
    font-weight: 600;
}

/* Leaderboard Section */
.leaderboard-section {
    background-color: var(--bg-accent);
}
.leaderboard-header {
    background: var(--primary-gradient);
    color: var(--bg-white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}
.leaderboard-entry {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    border: 1px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.leaderboard-entry:hover {
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px rgba(0,0,0,0.07);
}
.leaderboard-entry .entry-name { color: var(--primary-color); font-weight: 700; }
.leaderboard-entry .entry-phone { color: var(--text-light); font-size: 0.9rem; }
.medal-icon { width: 35px; }
.position-number { font-weight: 800; font-size: 1.5rem; color: var(--secondary-color); }

/* Footer */
.footer-section {
   /* background-color: var(--secondary-color);
    color: rgba(255, 255, 255, 0.7);*/
    background: #ffffff;
}
.footer-logo {
    max-height: 35px;
   /* filter: brightness(0) invert(1);*/
}

/* QUIZ SUCCESS PAGE STYLES */
.success-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    min-height: 70vh;
    background-color: var(--bg-accent);
}
.success-card {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}
.success-icon {
    font-size: 6rem;
    line-height: 1;
    color: #198754;
}
.success-card h1 {
    font-weight: 800;
    color: var(--secondary-color);
}
.success-card .btn {
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
}

/* AUTHENTICATION PAGE STYLES (Login/Register) */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    min-height: 80vh;
    background-color: var(--bg-accent);
}
.auth-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.auth-header {
    padding: 2rem 2rem 1.5rem 2rem;
}
.auth-title {
    font-weight: 800;
    color: var(--secondary-color);
}
.auth-body {
    padding: 0 2rem 2rem 2rem;
}
.form-floating > .form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: border-color 0.2s ease-in-out;
}
.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}
.form-floating > label {
    color: var(--text-light);
}
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.auth-card .form-text a {
    color: var(--primary-color);
    transition: opacity 0.2s ease;
}
.auth-card .form-text a:hover {
    opacity: 0.8;
}
.auth-body .btn-gradient {
    border-radius: 12px; /* Specific radius for login button */
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}


/* --- TABLET & DESKTOP STYLES (min-width: 992px) --- */
@media (min-width: 992px) {
    main section {
        padding: 50px 0;
    }

    .navbar-nav .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
        margin: 0 0.5rem;
    }
    .navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
        color: var(--primary-color);
        background-color: rgba(0, 123, 255, 0.07);
    }

    .nav-link-highlight:hover {
        background: var(--primary-gradient);
        filter: brightness(1.1);
    }

    .header-logo {
        max-height: 60px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .rule-item {
        padding: 1.25rem;
    }
}
