@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Playfair+Display:wght@700&display=swap");
/* Add this line */
@font-face {
    font-family: 'Germ'; /* You can name your font whatever you like */
    src: url('https://ivynovels.com/assets/fonts/Elsie-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
/* Global Styles & Variables */
:root {
    --light-bg: #f8f8f8;
    --light-text: #333;
    --light-header-bg: #fff;
    --light-card-bg: #fff;
    --light-border: #eee;
    --primary-color: #5c67f2;
    --secondary-color: #8a2be2; /* A nice purple */
    --accent-color: #ff9900; /* For stars or highlights */
    --shadow-light: rgba(0, 0, 0, 0.08);

    --dark-bg: #222;
    --dark-text: #e0e0e0;
    --dark-header-bg: #2c2c2c;
    --dark-card-bg: #333;
    --dark-border: #444;
    --shadow-dark: rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--light-bg);
    color: var(--light-text);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

body.dark .main-header {
    background-color: var(--dark-header-bg);
    border-bottom-color: var(--dark-border);
}

body.dark .main-nav a {
    color: var(--dark-text);
}

body.dark .main-nav a:hover,
body.dark .main-nav a.active {
    color: var(--primary-color);
}

body.dark .dropdown-menu {
    background-color: var(--dark-header-bg);
    border-color: var(--dark-border);
}

body.dark .search-bar input {
    background-color: #444;
    color: var(--dark-text);
    border-color: var(--dark-border);
}

body.dark .auth-button {
    background-color: var(--secondary-color);
    color: #fff;
    text-decoration: none;
}

body.dark .book-card,
body.dark .book-grid-item {
    background-color: var(--dark-card-bg);
    box-shadow: 0 4px 10px var(--shadow-dark);
    border-color: var(--dark-border);
}

body.dark .btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

body.dark .btn-secondary,
body.dark .btn-read {
    background-color: var(--secondary-color);
    color: #fff;
}

body.dark .pagination a {
    background-color: var(--dark-card-bg);
    color: var(--dark-text);
    border-color: var(--dark-border);
}

body.dark .pagination a.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

body.dark .mobile-menu-icon {
    color: #fff; /* White color for the icon */
}

body.dark h3 { /* Targets book titles */
    color: #fff; /* White color */
}

body.dark .main-footer p { /* Targets the copyright text */
    color: #fff; /* White color */
}

body.dark .main-footer .social-links a {
    color: #e0e0e0; /* A light grey, or #fff for pure white */
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 600;
    border: none; /* Ensure buttons have no default border */
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #4a54d3; /* Slightly darker primary */
}

.btn-secondary, .btn-read {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
    border: none; /* Ensure buttons have no default border */
    cursor: pointer;
}

.btn-secondary:hover, .btn-read:hover {
    background-color: #6a1a9e; /* Slightly darker secondary */
}


/* Header */
.main-header {
    background-color: var(--light-header-bg);
    padding: 15px 0;
    border-bottom: 1px solid var(--light-border);
    box-shadow: 0 2px 5px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping for mobile */
}

.logo-container {
    display: flex; /* Aligns image and text side-by-side */
    align-items: center; /* Vertically centers them */
    gap: 8px; /* Space between logo image and text */
    text-decoration: none; /* Remove underline from the link */
}

.logo-image {
    height: 40px; /* Adjust size as needed, maintain aspect ratio */
    width: auto;
    /* You might want to adjust max-height/max-width for responsiveness */
}

.logo-text {
    font-family: 'Germ', serif; /* Apply your custom font, fallback to serif */
    font-size: 2.2em; /* Keep it similar to the original size */
    font-weight: 700;
    letter-spacing: -1px;
    color: #008080; /* Teal Green for Light Mode */
    transition: color 0.3s ease; /* Smooth transition for color change */
}

body.dark .logo-text {
    color: #98fb98; /* Pale Green for Dark Mode */
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    gap: 25px;
    position: relative;
}

.nav-links a {
    color: var(--light-text);
    font-weight: 600;
    padding: 5px 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Dropdown Menu for Categories */
.nav-links li {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background-color: var(--light-header-bg);
    border: 1px solid var(--light-border);
    border-radius: 5px;
    box-shadow: 0 5px 15px var(--shadow-light);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

.nav-links li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 10px 15px;
}

.dropdown-menu a {
    color: var(--light-text);
    font-weight: 400;
    display: block;
    padding: 0; /* Override default nav-links padding */
}

.dropdown-menu a:hover {
    color: var(--primary-color);
    background-color: var(--light-bg);
}

.dropdown-menu a::after {
    display: none; /* Hide underline for dropdown items */
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-bar {
    display: flex;
    border: 1px solid var(--light-border);
    border-radius: 20px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.search-bar input {
    border: none;
    padding: 8px 15px;
    font-size: 0.9em;
    outline: none;
    background-color: transparent;
    color: var(--light-text);
    width: 150px; /* Adjust as needed */
}

.search-bar button {
    background-color: var(--primary-color);
    border: none;
    color: #fff;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #4a54d3;
}

.auth-button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.auth-button:hover,
.auth-button:visited,
.auth-button:active,
.auth-button:focus {
    color: #fff;               /* Keep text color consistent */
    text-decoration: none;     /* Prevent underline or color changes */
    background-color: #4a54d3; /* Optional: darker on hover */
}

.mobile-menu-icon {
    display: none; /* Hidden on desktop */
    font-size: 1.8em;
    cursor: pointer;
    color: var(--light-text);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1600x400/36454F/FFFFFF?text=Reading+Background') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* Featured Books Section */
.featured-books {
    margin-bottom: 50px;
}

.featured-books h2, .all-books h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.book-cards-wrapper {
    display: flex;
    overflow-x: auto; /* Enable horizontal scrolling */
    gap: 20px;
    padding-bottom: 20px; /* Space for scrollbar */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--primary-color) var(--light-border); /* Firefox */
}

/* Custom Scrollbar for Webkit browsers */
.book-cards-wrapper::-webkit-scrollbar {
    height: 8px;
}

.book-cards-wrapper::-webkit-scrollbar-track {
    background: var(--light-border);
    border-radius: 10px;
}

.book-cards-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
    border: 2px solid var(--light-bg);
}

body.dark .book-cards-wrapper::-webkit-scrollbar-thumb {
    border: 2px solid var(--dark-bg);
}


.book-card {
    flex: 0 0 auto; /* Prevent cards from shrinking */
    width: 220px; /* Fixed width for cards */
    background-color: var(--light-card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-light);
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--light-border);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow-light);
}

.book-card img {
    width: 100%;
    height: 250px; /* Fixed height for consistent look */
    object-fit: cover; /* Ensure image covers the area */
    border-radius: 5px;
    margin-bottom: 10px;
}

.book-card h3 {
    font-size: 1.4em;
    margin-bottom: 5px;
    color: var(--light-text);
}

body.dark .book-card h3 {
    color: #fff; /* White color */
}

.book-card .author {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

body.dark .book-card .author {
    color: #bbb;
}

.book-card .ratings {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.book-card .ratings .fas.filled {
    color: var(--accent-color);
}

.book-card .ratings span {
    color: var(--light-text);
    font-size: 0.9em;
    margin-left: 5px;
}

body.dark .book-card .ratings span {
    color: var(--dark-text);
}

/* All Books Section (Main Body) */
.all-books {
    margin-bottom: 50px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.book-grid-item {
    display: flex;
    background-color: var(--light-card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-light);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--light-border);
}

.book-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow-light);
}

.book-grid-item img {
    width: 120px;
    height: 180px;
    object-fit: cover;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.book-grid-item .book-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.book-grid-item h3 {
    font-size: 1.3em;
    margin-bottom: 5px;
    color: var(--light-text);
}

body.dark .book-grid-item h3 {
    color: #fff; /* White color */
}

.book-grid-item .author {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

body.dark .book-grid-item .author {
    color: #bbb;
}

.book-grid-item .description {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark .book-grid-item .description {
    color: #ccc;
}

.book-grid-item .ratings {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.book-grid-item .ratings .fas.filled {
    color: var(--accent-color);
}

.book-grid-item .ratings span {
    color: var(--light-text);
    font-size: 0.9em;
    margin-left: 5px;
}

body.dark .book-grid-item .ratings span {
    color: var(--dark-text);
}


/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid var(--light-border);
    border-radius: 5px;
    color: var(--primary-color);
    background-color: var(--light-card-bg);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.pagination a:hover:not(.active) {
    background-color: #f0f0f0;
    border-color: var(--primary-color);
}

.pagination a.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    cursor: default;
}

/* Footer */
.main-footer {
    background-color: var(--light-header-bg);
    color: var(--light-text);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--light-border);
    margin-top: 50px;
}

body.dark .main-footer {
    background-color: var(--dark-header-bg);
    border-top-color: var(--dark-border);
}

.main-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.main-footer p {
    font-size: 0.9em;
}

body.dark .main-footer p {
    color: #fff; /* White color */
}

.main-footer .social-links a {
    color: var(--light-text);
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

body.dark .main-footer .social-links a {
    color: #e0e0e0; /* Ensures social icons are visible and fit the theme */
}

.main-footer .social-links a:hover {
    color: var(--primary-color);
}

/* Light/Dark Toggle from Codepen Inspiration */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    margin-left: 20px;
    z-index: 1001; /* Ensure it's above other elements in the header */
    position: relative; /* z-index only works on positioned elements */
}

.checkbox {
    opacity: 0;
    position: absolute;
}

.checkbox-label {
    background-color: #111;
    width: 50px;
    height: 26px;
    border-radius: 50px;
    position: relative;
    padding: 5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2; /* Give label a higher z-index than sibling elements in the toggle */
}

.checkbox-label .fa-moon {color: #f1c40f;} /* Yellow */
.checkbox-label .fa-sun {color: #f39c12;} /* Orange */


.checkbox-label .ball {
    background-color: #fff;
    width: 22px;
    height: 22px;
    position: absolute;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    transition: transform 0.2s linear;
}

.checkbox:checked + .checkbox-label .ball {
    transform: translateX(24px);
}


/* Responsive Design */
@media (max-width: 992px) {
    .main-nav {
        gap: 10px;
    }
    .nav-links {
        gap: 15px;
    }
    .search-bar input {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        display: none; /* Hidden by default for mobile */
        margin-top: 15px;
        gap: 0;
    }

    .main-nav.active {
        display: flex; /* Show when active */
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--light-border);
    }
    body.dark .nav-links li {
        border-bottom-color: var(--dark-border);
    }

    .nav-links a {
        padding: 12px 0;
        width: 100%;
        display: block;
    }

    .nav-links a::after {
        display: none; /* Hide underline on mobile */
    }

    .dropdown-menu {
        position: static; /* Make dropdown flow with content on mobile */
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: rgba(0,0,0,0.05); /* Slightly different background for sub-items */
        transform: none;
        visibility: visible;
        opacity: 1;
        padding-left: 20px;
    }
    body.dark .dropdown-menu {
        background-color: rgba(255,255,255,0.05);
    }

    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 15px;
        align-items: stretch;
    }

    .search-bar {
        width: 100%;
    }

    .search-bar input {
        width: 100%;
    }

    .auth-button {
        width: 100%;
        text-decoration: none;
    }

    .dark-mode-toggle {
        margin: 10px 0 0 0; /* Adjust spacing for mobile */
    }

    .mobile-menu-icon {
        display: block; /* Show on mobile */
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .hero-section h1 {
        font-size: 2.5em;
    }

    .featured-books h2, .all-books h2 {
        font-size: 2em;
    }

    .book-card {
        width: 180px; /* Smaller cards for smaller screens */
    }

    .book-card img {
        height: 220px;
    }

    .book-grid {
        grid-template-columns: 1fr; /* Single column layout for very small screens */
    }

    .main-footer .container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    /* Existing rules remain */
}

/* --- Login/Register Page Styles --- */

/* Added a subtle background to the main area where the form resides */
.login-page-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 150px); /* Adjust height to fill viewport minus header/footer */
    padding: 60px 20px; /* Increased top/bottom padding for more breathing room */
    background-color: var(--light-bg); /* Use global variable */
    background: linear-gradient(to bottom right, var(--light-bg), #e0e0e0); /* Subtle gradient for light mode */
    transition: background-color 0.3s ease, background 0.3s ease;
}

body.dark .login-page-main {
    background-color: var(--dark-bg);
    background: linear-gradient(to bottom right, var(--dark-bg), #3a3a3a); /* Subtle gradient for dark mode */
}

.login-register-container {
    background-color: var(--light-card-bg); /* Consistent with card backgrounds */
    border-radius: 15px;
    box-shadow: 0 12px 25px var(--shadow-light); /* Slightly larger, softer shadow */
    padding: 23px; /* Increased padding inside the container */
    width: 100%;
    max-width: 600px; /* Increased max-width for a less slimmer look */
    text-align: center;
    border: 1px solid var(--light-border);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    /* Added animation for initial load */
    animation: fadeInScale 0.5s ease-out forwards;
     margin: 50px;
}

body.dark .login-register-container {
    background-color: var(--dark-card-bg);
    box-shadow: 0 12px 25px var(--shadow-dark);
    border-color: var(--dark-border);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.form-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 30px; /* Increased margin below toggle */
    border-radius: 25px;
    overflow: hidden;
    background-color: #f0f0f0; /* Light grey background for toggle */
    border: 1px solid var(--light-border);
}

body.dark .form-toggle {
    background-color: #444;
    border-color: var(--dark-border);
}

.form-toggle .toggle-btn {
    flex: 1;
    padding: 14px 20px; /* Slightly more padding for buttons */
    border: none;
    background-color: transparent;
    color: var(--light-text);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 25px;
}

body.dark .form-toggle .toggle-btn {
    color: var(--dark-text);
}

.form-toggle .toggle-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3); /* Stronger inner shadow for active state */
}

/* Subtle underline for active toggle button */
.form-toggle .toggle-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background-color: #fff; /* White line for active toggle */
    border-radius: 2px;
}


.form-toggle .toggle-btn:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark .form-toggle .toggle-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Auth Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2em; /* Slightly larger heading */
    margin-bottom: 30px; /* More space below heading */
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px; /* More space between form groups */
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px; /* More space below label */
    font-weight: 600;
    color: var(--light-text);
}

body.dark .form-group label {
    color: var(--dark-text);
}

.form-group input {
    width: 100%;
    padding: 14px 18px; /* Slightly more padding for inputs */
    border: 1px solid var(--light-border);
    border-radius: 8px;
    font-size: 1.05em; /* Slightly larger font */
    background-color: #fcfcfc;
    color: var(--light-text);
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark .form-group input {
    background-color: #444;
    border-color: var(--dark-border);
    color: var(--dark-text);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(92, 103, 242, 0.3); /* Larger, softer focus shadow */
}

.form-submit-btn {
    width: 100%;
    padding: 16px; /* Larger button */
    font-size: 1.2em; /* Larger font for button */
    font-weight: 700;
    border-radius: 8px;
    margin-top: 20px; /* More space above button */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Subtle button shadow */
}
.form-submit-btn:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.2); /* Enhance shadow on hover */
}

.forgot-password-link {
    display: block;
    margin-top: 20px; /* More space above link */
    font-size: 1em; /* Slightly larger font */
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: var(--secondary-color);
}


/* Responsive adjustments for forms */
@media (max-width: 480px) {
    .login-register-container {
        padding: 25px; /* Slightly more padding on small screens */
        /* Removed margin: 0 10px; to allow login-page-main padding to control side spacing */
        margin-left: auto;
    }

    .form-toggle .toggle-btn {
        padding: 12px 15px;
        font-size: 1em;
    }

    .auth-form h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        margin-bottom: 8px;
    }

    .form-group input {
        padding: 12px 15px;
        font-size: 1em;
    }

    .form-submit-btn {
        padding: 14px;
        font-size: 1.1em;
        margin-top: 15px;
    }

    .forgot-password-link {
        margin-top: 15px;
        font-size: 0.95em;
    }
}

/* --- Custom Modal Styles --- */

.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top (higher than header) */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); /* Optional: blur background */
    -webkit-backdrop-filter: blur(5px); /* For Safari */
}

body.dark .modal-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: var(--light-card-bg);
    margin: auto;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    position: relative;
    width: 90%;
    max-width: 500px;
    transform: translateY(-50px); /* Initial position for animation */
    opacity: 0; /* Initial opacity for animation */
    animation: modalSlideIn 0.3s forwards ease-out;
    border: 1px solid var(--light-border);
}

body.dark .modal-content {
    background-color: var(--dark-card-bg);
    box-shadow: 0 10px 30px var(--shadow-dark);
    border-color: var(--dark-border);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content.closing {
    animation: modalSlideOut 0.3s forwards ease-in;
}

@keyframes modalSlideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-50px);
        opacity: 0;
    }
}


.close-button {
    color: var(--light-text);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

body.dark .close-button {
    color: var(--dark-text);
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
}

.modal-header {
    margin-bottom: 20px;
    text-align: center;
}

.modal-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8em;
    color: var(--primary-color);
}

.modal-body {
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.6;
}

.modal-body p {
    color: var(--light-text);
}

body.dark .modal-body p {
    color: var(--dark-text);
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-footer button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
}

/* --- Real-time Validation Styles --- */

.form-group input.input-error {
    border-color: #e74c3c; /* Red border for errors */
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.form-group input.input-success {
    border-color: #2ecc71; /* Green border for success */
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

.validation-error-message {
    color: #e74c3c; /* Red text for error messages */
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
    text-align: left;
}

/* --- Custom Modal Styles --- */

.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top (higher than header) */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); /* Optional: blur background */
    -webkit-backdrop-filter: blur(5px); /* For Safari */
}

body.dark .modal-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: var(--light-card-bg);
    margin: auto;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    position: relative;
    width: 90%;
    max-width: 500px;
    transform: translateY(-50px); /* Initial position for animation */
    opacity: 0; /* Initial opacity for animation */
    animation: modalSlideIn 0.3s forwards ease-out;
    border: 1px solid var(--light-border);
}

body.dark .modal-content {
    background-color: var(--dark-card-bg);
    box-shadow: 0 10px 30px var(--shadow-dark);
    border-color: var(--dark-border);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content.closing {
    animation: modalSlideOut 0.3s forwards ease-in;
}

@keyframes modalSlideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-50px);
        opacity: 0;
    }
}


.close-button {
    color: var(--light-text);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

body.dark .close-button {
    color: var(--dark-text);
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
}

.modal-header {
    margin-bottom: 20px;
    text-align: center;
}

.modal-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8em;
    color: var(--primary-color);
}

.modal-body {
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.6;
}

.modal-body p {
    color: var(--light-text);
}

body.dark .modal-body p {
    color: var(--dark-text);
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-footer button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
}
/* New styles for 2FA OTP input boxes */
.otp-input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px; /* Add space below OTP inputs */
}

.otp-input {
    width: 45px; /* Fixed width for each box */
    height: 55px; /* Make it square-ish for better visual */
    font-size: 1.8em; /* Large font size for digits */
    text-align: center;
    border: 2px solid var(--light-border);
    border-radius: 8px;
    background-color: var(--light-bg);
    color: var(--light-text);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark .otp-input {
    background-color: #444;
    border-color: var(--dark-border);
    color: var(--dark-text);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(92, 103, 242, 0.3);
}

/* Styles for password visibility toggle icon */
.form-group.password-group {
    position: relative; /* Ensure the icon is positioned relative to this group */
}

.toggle-password-visibility {
    position: absolute;
    right: 15px; /* Adjust as needed for spacing from right edge */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    z-index: 10; /* Ensure it's above the input */
    padding: 5px; /* Increase clickable area */
}
body.dark .toggle-password-visibility {
    color: #ccc;
}

/* Adjust input padding for the eye icon so text doesn't go under it */
.form-group.password-group input {
    padding-right: 45px; /* Make space for the eye icon */
}

/* SUPPORT PAGE STYLE */
        .page-content {
            padding: 40px 20px;
            background-color: var(--light-bg);
            transition: background-color 0.3s ease;
            min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        body.dark .page-content {
            background-color: var(--dark-bg);
        }
        .support-container {
            background-color: var(--light-card-bg);
            border-radius: 15px;
            box-shadow: 0 8px 20px var(--shadow-light);
            padding: 40px;
            width: 100%;
            max-width: 900px;
            margin: 0 auto;
            text-align: center;
            transition: background-color 0.3s ease, box-shadow 0.3s ease;
        }
        body.dark .support-container {
            background-color: var(--dark-card-bg);
            box-shadow: 0 8px 20px var(--shadow-dark);
        }
        .support-container h1 {
            font-family: 'Playfair Display', serif;
            font-size: 3em;
            color: var(--primary-color);
            margin-bottom: 20px;
        }
        .support-container p {
            font-size: 1.1em;
            color: var(--light-text);
            margin-bottom: 20px;
        }
        body.dark .support-container p {
            color: var(--dark-text);
        }

        .contact-info {
            margin-top: 30px;
            margin-bottom: 40px;
            padding: 20px;
            border: 1px dashed var(--light-border);
            border-radius: 10px;
            background-color: var(--light-bg);
        }
        body.dark .contact-info {
            border-color: var(--dark-border);
            background-color: #3a3a3a;
        }
        .contact-info p {
            margin: 10px 0;
        }
        .contact-info a {
            color: var(--primary-color);
            text-decoration: underline;
        }
        .contact-info a:hover {
            color: var(--secondary-color);
        }

        /* Ticketing System Styles */
        .ticketing-section {
            margin-top: 50px;
            width: 100%;
            text-align: left;
        }
        .ticketing-section h2 {
            font-family: 'Playfair Display', serif;
            font-size: 2.2em;
            color: var(--secondary-color);
            margin-bottom: 30px;
            text-align: center;
        }

        .ticket-form-container, .my-tickets-container {
            background-color: var(--light-bg);
            border-radius: 10px;
            padding: 30px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            margin-bottom: 30px;
        }
        body.dark .ticket-form-container, body.dark .my-tickets-container {
            background-color: #3a3a3a;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }

        .ticket-form-container h3 {
            font-size: 1.8em;
            color: var(--light-text);
            margin-bottom: 20px;
            text-align: center;
        }
        body.dark .ticket-form-container h3 {
            color: var(--dark-text);
        }

        .ticket-form .form-group {
            margin-bottom: 20px;
            text-align: left;
        }
        .ticket-form label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--light-text);
        }
        body.dark .ticket-form label {
            color: var(--dark-text);
        }
        .ticket-form input[type="text"],
        .ticket-form textarea,
        .ticket-form select {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid var(--light-border);
            border-radius: 8px;
            font-size: 1em;
            background-color: #fcfcfc;
            color: var(--light-text);
            transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
        }
        body.dark .ticket-form input[type="text"],
        body.dark .ticket-form textarea,
        body.dark .ticket-form select {
            background-color: #444;
            border-color: var(--dark-border);
            color: var(--dark-text);
        }
        .ticket-form input[type="text"]:focus,
        .ticket-form textarea:focus,
        .ticket-form select:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(92, 103, 242, 0.3);
        }
        .ticket-form textarea {
            min-height: 120px;
            resize: vertical;
        }
        .ticket-form button {
            width: 100%;
            padding: 12px;
            font-size: 1.1em;
            font-weight: 700;
            margin-top: 10px;
        }

        /* My Tickets Section */
        .my-tickets-container h3 {
            font-size: 1.8em;
            color: var(--light-text);
            margin-bottom: 20px;
            text-align: center;
        }
        body.dark .my-tickets-container h3 {
            color: var(--dark-text);
        }

        .tickets-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .ticket-item {
            background-color: var(--light-card-bg);
            border: 1px solid var(--light-border);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
            text-align: left;
        }
        body.dark .ticket-item {
            background-color: #2c2c2c;
            border-color: #444;
        }

        .ticket-item:hover {
            box-shadow: 0 6px 15px rgba(0,0,0,0.1);
        }
        body.dark .ticket-item:hover {
            box-shadow: 0 6px 15px rgba(0,0,0,0.3);
        }

        .ticket-item strong {
            color: var(--primary-color);
            font-size: 1.1em;
        }
        .ticket-item span {
            color: var(--light-text);
        }
        body.dark .ticket-item span {
            color: var(--dark-text);
        }
        .ticket-status {
            font-weight: 700;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 0.9em;
            display: inline-block;
            margin-left: 10px;
        }
        .ticket-status.open { background-color: #ffebcc; color: #e67e22; } /* Orange-ish */
        .ticket-status.in_progress { background-color: #e0f2f7; color: #3498db; } /* Blue-ish */
        .ticket-status.resolved { background-color: #e6ffe6; color: #28a745; } /* Green */
        .ticket-status.closed { background-color: #f2f2f2; color: #888; } /* Grey */
        body.dark .ticket-status.open { background-color: rgba(230,126,34,0.2); color: #e67e22; }
        body.dark .ticket-status.in_progress { background-color: rgba(52,152,219,0.2); color: #3498db; }
        body.dark .ticket-status.resolved { background-color: rgba(40,167,69,0.2); color: #28a745; }
        body.dark .ticket-status.closed { background-color: rgba(136,136,136,0.2); color: #888; }

        .no-tickets-message {
            font-style: italic;
            color: #777;
            padding: 20px;
            border: 1px dashed #ddd;
            border-radius: 8px;
            background-color: #f9f9f9;
        }
        body.dark .no-tickets-message {
            color: #bbb;
            border-color: #666;
            background-color: #333;
        }

        /* Responsive Adjustments */
        @media (max-width: 768px) {
            .support-container {
                padding: 30px 20px;
            }
            .support-container h1 {
                font-size: 2.5em;
            }
            .ticketing-section h2 {
                font-size: 1.8em;
            }
            .ticket-form-container, .my-tickets-container {
                padding: 20px;
            }
            .ticket-form-container h3, .my-tickets-container h3 {
                font-size: 1.5em;
            }
        }
        @media (max-width: 480px) {
            .page-content {
                padding: 20px 10px;
            }
            .support-container {
                padding: 25px 15px;
            }
            .support-container h1 {
                font-size: 2em;
            }
            .contact-info {
                padding: 15px;
            }
            .ticket-form-container h3, .my-tickets-container h3 {
                font-size: 1.3em;
            }
        }
        
/*SUPPORT PAGE STYLE END*/


/* ADMIN LOGIN STYLE*/

  /* Specific styles for admin login page */
        .admin-login-main {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: calc(100vh - 100px); /* Adjust based on header/footer */
            background-color: var(--light-bg);
            transition: background-color 0.3s ease;
            padding: 20px;
        }

        body.dark .admin-login-main {
            background-color: var(--dark-bg);
        }

        .admin-login-container {
            background-color: var(--light-card-bg);
            border-radius: 15px;
            box-shadow: 0 8px 20px var(--shadow-light);
            padding: 40px;
            width: 100%;
            max-width: 450px;
            text-align: center;
            border: 1px solid var(--light-border);
            transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        }

        body.dark .admin-login-container {
            background-color: var(--dark-card-bg);
            box-shadow: 0 8px 20px var(--shadow-dark);
            border-color: var(--dark-border);
        }

        .admin-login-container h1 {
            font-family: 'Playfair Display', serif;
            font-size: 2.5em;
            margin-bottom: 25px;
            color: var(--primary-color);
        }

        .admin-login-container .message {
            padding: 10px 15px;
            margin-bottom: 20px;
            border-radius: 8px;
            font-weight: 600;
            color: #fff;
        }

        .admin-login-container .message.error {
            background-color: #dc3545;
        }

        .admin-login-container .message.success {
            background-color: #28a745;
        }

        .admin-login-container .form-group {
            margin-bottom: 20px;
            text-align: left;
        }

        .admin-login-container label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--light-text);
        }

        body.dark .admin-login-container label {
            color: var(--dark-text);
        }

        .admin-login-container input[type="text"],
        .admin-login-container input[type="password"] {
            width: calc(100% - 30px); /* Adjust for padding */
            padding: 12px 15px;
            border: 1px solid var(--light-border);
            border-radius: 8px;
            font-size: 1em;
            background-color: #fcfcfc;
            color: var(--light-text);
            transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
        }

        body.dark .admin-login-container input {
            background-color: #444;
            border-color: var(--dark-border);
            color: var(--dark-text);
        }

        .admin-login-container input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(92, 103, 242, 0.3);
        }

        .admin-login-container .btn-primary {
            width: 100%;
            padding: 14px;
            font-size: 1.1em;
            font-weight: 700;
            border-radius: 8px;
            margin-top: 10px;
        }

        /* Responsive adjustments */
        @media (max-width: 480px) {
            .admin-login-container {
                padding: 30px 20px;
            }
            .admin-login-container h1 {
                font-size: 2em;
            }
        }
        
/*ADMIN DASHBOARD*/
        /* Admin Dashboard Specific Styles */
        .admin-dashboard-main {
            display: flex;
            min-height: calc(100vh - 100px); /* Adjust based on header/footer */
            background-color: var(--light-bg);
            transition: background-color 0.3s ease;
        }

        body.dark .admin-dashboard-main {
            background-color: var(--dark-bg);
        }

        .admin-sidebar {
            width: 250px;
            background-color: var(--light-card-bg);
            padding: 30px 20px;
            box-shadow: 2px 0 10px rgba(0,0,0,0.05);
            display: flex;
            flex-direction: column;
            gap: 15px;
            border-right: 1px solid var(--light-border);
            transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        }

        body.dark .admin-sidebar {
            background-color: var(--dark-card-bg);
            border-right-color: var(--dark-border);
            box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        }

        .admin-sidebar h2 {
            font-family: 'Playfair Display', serif;
            font-size: 1.8em;
            color: var(--primary-color);
            margin-bottom: 20px;
            text-align: center;
        }

        .admin-sidebar-nav {
            display: flex; /* Ensure nav itself is a flex container */
            flex-direction: column; /* Stack links vertically by default */
            gap: 15px;
            flex-grow: 1; /* Allow it to take available space */
        }

        .admin-sidebar-nav a {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 12px 15px;
            border-radius: 8px;
            text-decoration: none;
            color: var(--light-text);
            font-weight: 600;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        body.dark .admin-sidebar-nav a {
            color: var(--dark-text);
        }

        .admin-sidebar-nav a:hover,
        .admin-sidebar-nav a.active {
            background-color: var(--primary-color);
            color: #fff;
        }

        .admin-sidebar-nav a i {
            font-size: 1.2em;
        }

        .admin-content {
            flex-grow: 1;
            padding: 30px;
            background-color: var(--light-bg);
            transition: background-color 0.3s ease;
        }

        body.dark .admin-content {
            background-color: var(--dark-bg);
        }

        .admin-content h1 {
            font-family: 'Playfair Display', serif;
            font-size: 2.5em;
            color: var(--primary-color);
            margin-bottom: 25px;
        }

        .admin-welcome-message {
            font-size: 1.1em;
            color: var(--light-text);
            line-height: 1.6;
        }

        body.dark .admin-welcome-message {
            color: var(--dark-text);
        }

        .admin-logout-button {
            background-color: #dc3545;
            color: #fff;
            padding: 10px 20px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            transition: background-color 0.3s ease;
            margin-top: auto; /* Pushes logout to the bottom of the sidebar */
            text-align: center;
        }
        .admin-logout-button:hover {
            background-color: #c82333;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .admin-dashboard-main {
                flex-direction: column;
            }
            .admin-sidebar {
                width: 100%;
                flex-direction: column; /* Keep column for h2, nav, logout */
                padding: 20px; /* Slightly less padding */
                box-shadow: 0 2px 10px rgba(0,0,0,0.05);
                border-right: none;
                border-bottom: 1px solid var(--light-border);
                align-items: center; /* Center items in the column */
            }
            body.dark .admin-sidebar {
                border-bottom-color: var(--dark-border);
            }
            .admin-sidebar h2 {
                width: 100%;
                margin-bottom: 15px;
                text-align: center;
            }
            .admin-sidebar-nav {
                flex-direction: row; /* Make nav links horizontal on tablet */
                flex-wrap: wrap;
                justify-content: center;
                gap: 10px;
                width: 100%; /* Ensure nav takes full width */
                margin-bottom: 15px; /* Space before logout button */
            }
            .admin-sidebar-nav a {
                padding: 10px 15px; /* Slightly larger touch targets */
                font-size: 0.95em;
                gap: 10px;
            }
            .admin-logout-button {
                margin-top: 0; /* Reset margin-top from desktop style */
                width: auto; /* Allow button to size itself */
                display: block; /* Make it a block element to center with margin auto */
                margin-left: auto;
                margin-right: auto;
            }
            .admin-content {
                padding: 20px;
            }
            .admin-content h1 {
                font-size: 2em;
            }
        }

        @media (max-width: 480px) {
            .admin-sidebar {
                padding: 15px 10px; /* Even less padding for small phones */
            }
            .admin-sidebar h2 {
                font-size: 1.6em; /* Smaller heading */
                margin-bottom: 10px;
            }
            .admin-sidebar-nav a {
                font-size: 0.85em; /* Smaller font for links */
                padding: 8px 12px;
                gap: 8px;
            }
            .admin-logout-button {
                padding: 8px 15px; /* Smaller logout button */
                font-size: 0.9em;
            }
            .admin-content {
                padding: 15px;
            }
            .admin-content h1 {
                font-size: 1.8em;
            }
        }

/*ADMIN DASHBOARD ENDS*/

/*ADMIN LOGIN STYLE END*/