/* frontend/css/style.css */

/* General Body Styles */
body {
    font-family: 'Inter', sans-serif; /* Using Inter font for a modern look */
    line-height: 1.6;
    color: #333;
    background: linear-gradient(to bottom right, #e0f2f7, #c1e4ed); /* Light blue gradient background */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure footer sticks to bottom */
}

/* Main Content Area */
main.container {
    flex: 1; /* Allows main content to grow and push footer down */
    padding-top: 30px;
    padding-bottom: 30px;
}

/* Navbar Customizations */
.navbar {
    background: linear-gradient(to right, #007bff, #0056b3); /* Blue gradient for navbar */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: sticky; /* Make the navbar sticky */
    top: 0; /* Stick to the top of the viewport */
    z-index: 1020; /* Ensure it stays above other content, slightly less than Bootstrap's modal z-index */
}

.navbar-brand {
    font-weight: 700; /* Bolder font */
    font-size: 1.8rem; /* Larger font size */
    color: #fff !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.navbar-nav .nav-link {
    color: #e0f7fa !important; /* Lighter text for links */
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    transform: translateY(-2px); /* Subtle hover effect */
}

.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    color: #333;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #e9ecef;
    color: #007bff;
}

/* Offcanvas (Mobile Drawer) Styling */
.offcanvas {
    background: linear-gradient(to bottom, #007bff, #0056b3); /* Match navbar gradient */
    color: #fff;
}

.offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.offcanvas .offcanvas-title {
    color: #fff;
    font-weight: 700;
}

.offcanvas .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); /* Make close button white */
}

.offcanvas .navbar-nav .nav-link {
    color: #fff !important; /* White links in offcanvas */
    padding: 0.75rem 1rem;
    border-radius: 0.3rem;
    margin-bottom: 0.25rem;
}

.offcanvas .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: none; /* Remove lift effect in drawer */
}

.offcanvas .dropdown-menu {
    background-color: rgba(0, 0, 0, 0.2); /* Slightly darker dropdown in drawer */
    border: none;
}

.offcanvas .dropdown-item {
    color: #fff;
    padding: 0.5rem 1rem;
}

.offcanvas .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}


/* Card Styling for Results and general content */
.card {
    border-radius: 0.75rem; /* More rounded corners */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1); /* Stronger shadow */
    margin-bottom: 25px;
    overflow: hidden; /* Ensures content respects border-radius */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(to right, #007bff, #0056b3); /* Gradient for card headers */
    color: white;
    font-weight: 600;
    font-size: 1.15rem;
    border-bottom: none; /* Remove default border */
    padding: 1rem 1.25rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.card-body {
    padding: 1.5rem;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: #0056b3; /* Darker blue for headings */
    font-weight: 700;
}

.display-5 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0056b3;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.05);
}

/* Button Styling */
.btn-primary {
    background: linear-gradient(to right, #007bff, #0056b3);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(to right, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background: linear-gradient(to right, #28a745, #218838);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-success:hover {
    background: linear-gradient(to right, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-warning {
    background: linear-gradient(to right, #ffc107, #e0a800);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #333; /* Ensure text is readable */
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-warning:hover {
    background: linear-gradient(to right, #e0a800, #c69500);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Specific styling for result PDF links */
.result-pdf-link {
    display: block;
    margin-top: 15px;
    font-size: 1.1em;
    padding: 10px 15px;
    border-radius: 0.25rem;
    background-color: #e9ecef; /* Light gray background for links */
    color: #007bff; /* Blue text */
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.result-pdf-link:hover {
    background-color: #007bff;
    color: white;
    text-decoration: none;
}

.result-pdf-link i {
    margin-right: 8px;
}

/* Countdown Timer Styling */
.countdown-timer {
    font-size: 1.4em; /* Slightly larger */
    font-weight: 700;
    color: #28a745; /* Green for success */
    margin-top: 15px;
    text-align: center;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.countdown-timer.red {
    color: #dc3545; /* Red for danger */
}

/* Footer Styling */
footer {
    background-color: #343a40; /* Darker footer */
    color: #f8f9fa;
    padding: 20px 0;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
}

/* Content Pages (About Us, Privacy Policy, Terms & Conditions) */
.content-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 0.75rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.content-section h1,
.content-section h2,
.content-section h3 {
    color: #0056b3;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.content-section p {
    margin-bottom: 1em;
}

.content-section ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 1em;
}

.content-section ol {
    list-style-type: decimal;
    margin-left: 20px;
    margin-bottom: 1em;
}

/* Live Draw Section */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 0.75rem; /* Match card radius */
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Previous Results Page - Date Picker */
.form-label {
    font-weight: 600;
}

/* Target the text input for datepicker and make text white */
.form-control[type="text"][readonly] {
    background-color: #fff; /* Ensure it's white */
    cursor: pointer; /* Indicate it's clickable */
    color: #000; /* Set text color to black for readability, as it's on a white background */
}

/* Style for jQuery UI Datepicker calendar icon */
.ui-datepicker-trigger {
    vertical-align: middle;
    margin-left: 5px; /* Adjust spacing */
    cursor: pointer;
    width: 24px; /* Adjust icon size */
    height: 24px;
}


/* AdSense Styling (Optional, for visual placeholders if needed) */
.adsbygoogle {
    background-color: #f0f0f0; /* Light gray background for ad blocks */
    border: 1px dashed #ccc; /* Dashed border to indicate ad space */
    min-height: 100px; /* Minimum height for visibility */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-style: italic;
    font-size: 0.9em;
    border-radius: 0.5rem;
    padding: 10px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) { /* Adjust breakpoint for navbar collapse */
    .navbar-collapse {
        display: none !important; /* Hide desktop nav on mobile */
    }
    .navbar-toggler {
        display: block; /* Show toggler on mobile */
    }
}

@media (min-width: 992px) {
    .navbar-toggler {
        display: none; /* Hide toggler on desktop */
    }
    .navbar-collapse {
        display: flex !important; /* Ensure desktop nav is flex on desktop */
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    .display-5 {
        font-size: 2rem;
    }
    .countdown-timer {
        font-size: 1.2em;
    }
    .card-body {
        padding: 1rem;
    }
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}
