/* * =======================================
 * BASE.CSS
 * Common styles for the entire site.
 * =======================================
 */

/* --- Global Reset & Body --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0d1b2a;
    color: #f0f0f0;
    overflow-x: hidden;
}

#dna-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(180deg, #0d1b2a 0%, #000000 100%);
    opacity: 0.25;
}

/* Ensure all other content is on top of the canvas */
.navbar, section, footer {
    position: relative;
    z-index: 1;
}

/* --- Navbar --- */
.navbar {
    background: rgba(20, 20, 40, 0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    height: 60px;
    width: 90%;
    max-width: 1400px;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    top: 10px;
    background: rgba(25, 25, 45, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    width: 50%;
}

.nav-left {
    justify-content: flex-end;
    padding-right: 150px; 
}

.nav-right {
    justify-content: flex-start;
    padding-left: 150px;
}

/* This is the class we fixed in base.html */
.nav-item {
    padding: 0 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    color: #e0e0e0;
    text-decoration: none;
    height: 60px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
}

/* This is the active class from base.html */
 .nav-item.active {
     border-bottom: 2px solid #00d65b;
     padding-bottom: 2px;
     border-radius: 0; 
 }

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #00d65b;
}

.nav-item.active:hover {
    background-color: transparent;
}
/* === MODIFIED RULE === */
/*.nav-left .nav-item:first-child {
    /* We remove the border-radius from here to prevent the ugly curve */
    /* border-top-left-radius: 30px; */
    /* border-bottom-left-radius: 30px; */


/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    background-color: transparent;
    height: 100%;
}

/* Added .nav-item wrapper for correct hover */
.nav-item.dropdown:hover .dropbtn,
.dropbtn.active {
    color: #00d65b;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(30, 35, 60, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3);
    z-index: 1;
    border-radius: 10px;
    top: 100%;
    padding-top: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-content a {
    color: #e0e0e0;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 15px;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #00d65b;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.logo-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    width: 200px;
    max-height: 55px;
    height: auto;
    object-fit: contain;
}

/* --- Mobile Menu --- */
.mobile-menu-button {
    display: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 24px;
    cursor: pointer;
    z-index: 102;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(30, 30, 50, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    padding-top: 70px;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.mobile-menu-title {
    padding: 20px 30px 10px;
    font-size: 16px;
    font-weight: 600;
    color: #00d65b;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-item {
    display: block;
    padding: 18px 30px;
    font-size: 18px;
    font-weight: 500;
    color: #e0e0e0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.3s, color 0.3s;
}

.mobile-menu-item.sub-item {
    padding-left: 45px;
    font-size: 16px;
    color: #c0c0d0;
}

.mobile-menu-item:hover,
.mobile-menu-item.active { /* Added .active for mobile */
    background-color: rgba(255, 255, 255, 0.1);
    color: #00d65b;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- Footer --- */
footer { 
    background-color: #050510;
    padding: 60px 5% 30px;
    margin-top: 60px;
    border-top: 1px solid rgba(0, 214, 91, 0.2);
}
.footer-content { 
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-section { 
    flex: 1;
    min-width: 200px;
}
.footer-section h4 { 
    color: #00d65b;
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: 600;
}
.footer-section ul { 
    list-style-type: none;
    /* Reset padding for <ul> */
    padding-left: 0; 
}
.footer-section li { 
    margin-bottom: 12px; 
}
.footer-section a { 
    color: #b0b0c0;
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
}
.footer-section a:hover { 
    color: #00d65b;
    padding-left: 5px;
}
.copyright { 
    text-align: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.mobile-auth-buttons { 
    display: none; 
}


/* --- Responsive Media Queries (for base elements) --- */
@media (max-width: 1200px) {
    .nav-left { padding-right: 120px; } 
    .nav-right { padding-left: 120px; }
    .navbar { width: 95%; }
}

@media (max-width: 992px) {
    .nav-left { padding-right: 80px; }
    .nav-right { padding-left: 80px; }
    .nav-item { padding: 0 18px; }
}

@media (max-width: 768px) {
    .mobile-menu-button { display: block; }
    .nav-left, .nav-right { display: none; }
    .logo-container { left: 20px; transform: translate(0, -50%); }
    .logo-image { width: 150px; }
}

@media (max-width: 576px) {
    .navbar { width: 90%; top: 10px; border-radius: 25px; }
    .footer-section { min-width: 100%; text-align: center; }
    /* ul padding was already reset, so this is safe */
    .footer-section ul { padding-left: 0; }
}



/* =======================================
 * NEW STYLES FOR DJANGO MESSAGES
 * =======================================
 */

.django-messages {
    position: relative;
    z-index: 101;
    padding-top: 120px; /* Adjust as needed to clear your fixed navbar */
    text-align: center;
    width: 100%;
    /* Ensure it doesn't get hidden */
    overflow: visible; 
}

.message {
    color: #fff;
    padding: 15px;
    margin: 0 auto 10px;
    max-width: 500px;
    border-radius: 10px;
    font-weight: 600;
}

/* Style for 'success' messages (from views.py) */
.message.success {
    background: #00d65b;
}

/* Style for 'error' messages (from views.py) */
.message.error {
    background: #ff4c4c;
}

/* Style for 'info', 'warning', or 'debug' messages */
.message.info {
    background: #4c9eff;
}
.message.warning {
    background: #ffc107;
    color: #000;
}