/* CSS Reset and Variables */
:root {
    --primary-color: #007BFF; /* A vibrant blue for tech */
    --secondary-color: #FFC107; /* A warm yellow for solar */
    --accent-color: #28A745; /* A green for sustainability */
    --dark-color: #343A40;
    --light-color: #F8F9FA;
    --text-color: #555;
    --font-family: 'Poppins', sans-serif;
    --card-bg: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- PRELOADER --- */
.preloader { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: #000; 
    display: flex; 
    justify-content: center; 
    align-items: flex-end; 
    z-index: 10001; 
    overflow: hidden; 
    animation: fadeOutBackground 1s ease-out 3.5s forwards; 
}
.preloader .sun { 
    width: 150px; 
    height: 150px; 
    background: radial-gradient(circle, #FFD700, #FFA500, #FF4500); 
    border-radius: 50%; 
    box-shadow: 0 0 50px #FFD700, 0 0 100px #FFA500; 
    position: relative; 
    animation: sunrise 3s ease-in-out forwards; 
}
@keyframes sunrise { 
    0% { transform: translateY(100%); opacity: 0.8; } 
    50% { opacity: 1; } 
    100% { transform: translateY(-150%); opacity: 1; } 
}
@keyframes fadeOutBackground { 
    to { opacity: 0; visibility: hidden; } 
}

/* General Styling */
.container { 
    max-width: 1200px; 
    margin: auto; 
    padding: 0 2rem; 
}
section { 
    padding: 6rem 0; 
}
.section-title { 
    text-align: center; 
    font-size: 2.5rem; 
    color: var(--dark-color); 
    margin-bottom: 1rem; 
    font-weight: 600; 
}
.section-subtitle { 
    text-align: center; 
    font-size: 1.1rem; 
    max-width: 600px; 
    margin: 0 auto 4rem auto; 
}
.btn { 
    display: inline-block; 
    padding: 0.8rem 2.5rem; 
    border-radius: 50px; 
    text-decoration: none; 
    background: var(--primary-color); 
    color: white; 
    font-weight: 600; 
    transition: all 0.3s ease; 
    border: none; 
    cursor: pointer; 
}
.btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4); 
}
.btn-secondary { 
    background: var(--accent-color); 
}
.btn-secondary:hover { 
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4); 
}

/* Header & Navigation */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1.5rem 2rem; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000; 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(10px); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    transition: all 0.3s ease; 
}
.navbar .logo { 
    font-weight: 700; 
    font-size: 1.8rem; 
    color: var(--dark-color); 
    text-decoration: none; 
}
.navbar .logo span { 
    color: var(--secondary-color); 
}
.nav-menu { 
    display: flex; 
    align-items: center; 
    gap: 2rem; 
}
.nav-menu .nav-links { 
    list-style: none; 
    display: flex; 
    gap: 2rem; 
}
.nav-menu .nav-links a { 
    text-decoration: none; 
    color: var(--dark-color); 
    font-weight: 600; 
    transition: color 0.3s ease; 
}
.nav-menu .nav-links a:hover { 
    color: var(--primary-color); 
}
.nav-controls { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
}
.nav-auth { 
    display: flex; 
    gap: 1rem; 
}
.nav-auth .btn { 
    padding: 0.5rem 1.5rem; 
}
.nav-auth .btn-outline { 
    background: transparent; 
    border: 2px solid var(--primary-color); 
    color: var(--primary-color); 
}
.nav-auth .btn-outline:hover { 
    background: var(--primary-color); 
    color: white; 
}

/* NEW: Nav User Info Display */
.nav-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--dark-color); /* General text color in light mode */
    font-weight: 600;
}

/* Modal and Chatbot */
.auth-modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    z-index: 10000; 
    display: none; 
    justify-content: center; 
    align-items: center; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
}
.auth-modal-overlay.show { 
    display: flex; 
    opacity: 1; 
}
.auth-modal { 
    background: var(--card-bg); 
    padding: 2rem; 
    border-radius: 15px; 
    width: 90%; 
    max-width: 400px; 
    position: relative; 
    transform: scale(0.95); 
    transition: transform 0.3s ease; 
}
.auth-modal-overlay.show .auth-modal { 
    transform: scale(1); 
}
.auth-modal .close-modal { 
    position: absolute; 
    top: 1rem; 
    right: 1rem; 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    cursor: pointer; 
    color: var(--text-color); 
}
.auth-tabs { 
    display: flex; 
    border-bottom: 1px solid #ddd; 
    margin-bottom: 1.5rem; 
}
.auth-tabs button { 
    flex: 1; 
    padding: 1rem; 
    background: none; 
    border: none; 
    font-size: 1rem; 
    font-weight: 600; 
    cursor: pointer; 
    color: var(--text-color); 
    border-bottom: 3px solid transparent; 
}
.auth-tabs button.active { 
    color: var(--primary-color); 
    border-bottom-color: var(--primary-color); 
}
.auth-form { 
    display: none; 
    flex-direction: column; 
    gap: 1rem; 
}
.auth-form.active { 
    display: flex; 
}
.form-group { 
    display: flex; 
    flex-direction: column; 
}
.form-group label { 
    margin-bottom: 0.5rem; 
    font-weight: 600; 
}
.form-group input { 
    padding: 0.8rem; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    font-size: 1rem; 
}
.auth-form .btn { 
    margin-top: 1rem; 
}
.form-switch-link { 
    text-align: center; 
    margin-top: 1rem; 
}
.form-switch-link a { 
    color: var(--primary-color); 
    text-decoration: none; 
    font-weight: 600; 
}

/* NEW: Auth Message Display */
.auth-message {
    font-size: 0.9rem;
    margin-top: 10px;
}

.chatbot-fab { 
    position: fixed; 
    bottom: 2rem; 
    right: 2rem; 
    width: 60px; 
    height: 60px; 
    background-color: var(--primary-color); 
    color: white; 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 1.8rem; 
    cursor: pointer; 
    box-shadow: 0 4px 20px rgba(0,123,255,0.4); 
    z-index: 999; 
    transition: transform 0.3s ease; 
}
.chatbot-fab:hover { 
    transform: scale(1.1); 
}
.chatbot-popup { 
    position: fixed; 
    bottom: 6.5rem; 
    right: 2rem; 
    width: 90%; 
    max-width: 350px; 
    height: 70vh; 
    max-height: 500px; 
    background: var(--card-bg); 
    border-radius: 15px; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.15); 
    display: flex; 
    flex-direction: column; 
    z-index: 998; 
    transform: scale(0.95) translateY(10px); 
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.3s ease-out; 
}
.chatbot-popup.show { 
    transform: scale(1) translateY(0); 
    opacity: 1; 
    visibility: visible; 
}
.chatbot-header { 
    padding: 1rem; 
    background: var(--primary-color); 
    color: white; 
    border-top-left-radius: 15px; 
    border-top-right-radius: 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.chatbot-header h3 { 
    margin: 0; 
    font-size: 1.2rem; 
}
.chatbot-header .close-chatbot { 
    background: none; 
    border: none; 
    color: white; 
    font-size: 1.2rem; 
    cursor: pointer; 
}
.chatbot-body { 
    flex-grow: 1; 
    padding: 1rem; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 0.75rem; 
    background-color: #f4f4f4; 
}
.chat-message { 
    padding: 0.6rem 1rem; 
    border-radius: 18px; 
    max-width: 80%; 
    line-height: 1.4; 
}
.bot-message { 
    background: #e5e5ea; 
    color: #000; 
    align-self: flex-start; 
    border-bottom-left-radius: 4px; 
}
.user-message { 
    background: var(--primary-color); 
    color: #fff; 
    align-self: flex-end; 
    border-bottom-right-radius: 4px; 
}
.chatbot-footer { 
    display: flex; 
    padding: 0.75rem; 
    border-top: 1px solid #e0e0e0; 
}
#chatbot-input { 
    flex-grow: 1; 
    border: 1px solid #ccc; 
    border-radius: 20px; 
    padding: 0.6rem 1rem; 
    font-size: 1rem; 
    outline: none; 
}
#chatbot-send { 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    color: var(--primary-color); 
    cursor: pointer; 
    margin-left: 0.5rem; 
    padding: 0.5rem; 
}

/* Hero Section */
.hero { 
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1509391366360-2e959784a276?q=80&w=2070&auto=format&fit=crop'); 
    background-size: cover; 
    background-position: center; 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    color: white; 
    padding-top: 80px; 
}
.hero h1 { 
    font-size: 3.5rem; 
    font-weight: 700; 
    margin-bottom: 1rem; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero p { 
    font-size: 1.25rem; 
    max-width: 700px; 
    margin-bottom: 2.5rem; 
    text-shadow: 0 1px 5px rgba(0,0,0,0.5); 
}

/* Products Section */
#products {
    background-color: var(--light-color); /* Light background in light mode */
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.product-card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    
    position: relative; /* Needed for ::before positioning */
    overflow: hidden; /* Ensures the border-radius cuts off the ::before if it extends */
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}
.product-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.product-card h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-top: 0.5rem;
}
.product-card p:empty {
    display: none;
}
/* Product card icons in Ecosystem grid: odd are blue, even are green */
.product-card-link:nth-child(even) .product-card .icon {
    color: var(--accent-color);
}

/* Styling for the side line (only in light mode) */
.product-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px; /* Thickness of the line */
    height: 65%; /* Height of the line relative to card height */
    border-radius: 0 4px 4px 0; /* Rounded right edge */
    transition: background-color 0.3s ease; /* Smooth color transition on theme change */
}

/* Coloring the side lines based on nth-child for LIGHT MODE */
.product-card-link:nth-child(odd) .product-card::before { background-color: var(--primary-color); }
.product-card-link:nth-child(even) .product-card::before { background-color: var(--accent-color); }


/* Technology Section */
#tech { 
    background-color: var(--light-color); 
}
.tech-stack { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 4rem; 
    flex-wrap: wrap; 
    margin-top: 2rem; 
}
.tech-item { 
    text-align: center; 
}
.tech-item .icon { 
    font-size: 4rem; 
    color: var(--dark-color); 
    margin-bottom: 1rem; 
}
.tech-item h3 { 
    font-size: 1.5rem; 
    color: var(--dark-color); 
}

/* CTA Section */
.cta { 
    background: var(--dark-color); 
    color: white; 
    text-align: center; 
    border-radius: 15px; 
    padding: 4rem 2rem; 
}
.cta h2 { 
    font-size: 2.2rem; 
}
.cta p { 
    margin: 1rem 0 2rem 0; 
    font-size: 1.1rem; 
}
.cta .btn-secondary { 
    color: white; 
}

/* Footer */
.footer { 
    background: #222; 
    color: #ccc; 
    text-align: center; 
    padding: 2rem 0; 
}

/* --- DARK MODE & THEME SWITCHER --- */
.theme-switcher { 
    background: none; 
    border: none; 
    font-size: 1.3rem; 
    cursor: pointer; 
    color: var(--dark-color); 
    transition: color 0.3s ease, transform 0.3s ease; 
    padding: 0.5rem; 
    line-height: 1; 
}
.theme-switcher:hover { 
    color: var(--primary-color); 
    transform: rotate(45deg); 
}

body.dark-mode {
    --light-color: #1a1a1a;
    --dark-color: #f5f5f5;
    --text-color: #bbbbbb;
    --card-bg: #242424;
}
.dark-mode .btn:hover { 
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.25); 
}
.dark-mode .btn-secondary:hover { 
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.25); 
}
.dark-mode .navbar { 
    background: rgba(26, 26, 26, 0.8); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.5); 
}
.dark-mode .navbar .logo, 
.dark-mode .nav-menu .nav-links a,
.dark-mode .theme-switcher { 
    color: var(--dark-color); 
}
.dark-mode .theme-switcher:hover { 
    color: var(--secondary-color); 
}
.dark-mode .nav-auth .btn-outline { 
    color: var(--primary-color); 
    border-color: var(--primary-color); 
}
.dark-mode .nav-auth .btn-outline:hover { 
    background: var(--primary-color); 
    color: white; 
}
.dark-mode .auth-modal { 
    background: #2a2a2e; 
}
.dark-mode .auth-modal .close-modal,
.dark-mode .auth-tabs button { 
    color: var(--text-color); 
}
.dark-mode .auth-tabs { 
    border-bottom-color: #444; 
}
.dark-mode .auth-tabs button.active { 
    color: var(--primary-color); 
}
.dark-mode .form-group label { 
    color: var(--dark-color); 
}
.dark-mode .form-group input { 
    background-color: #333; 
    border-color: #555; 
    color: var(--dark-color); 
}
.dark-mode .chatbot-body { 
    background-color: #2a2a2e; 
}
.dark-mode .bot-message { 
    background: #3a3b3c; 
    color: #e4e6eb; 
}
.dark-mode .chatbot-footer { 
    border-top-color: #444; 
}
.dark-mode #chatbot-input { 
    background-color: #3a3b3c; 
    border-color: #555; 
    color: #e4e6eb; 
}
.dark-mode .tech-item .icon,
.dark-mode .tech-item h3 { 
    color: var(--dark-color); 
}
.dark-mode .cta { 
    background: var(--card-bg); 
}
.dark-mode .footer { 
    background: #111; 
    color: #aaa; 
}

/* NEW: Nav User Info Display in Dark Mode */
.dark-mode .nav-user-info #user-display-name {
    color: var(--dark-color); /* This variable resolves to light text in dark mode */
}
.dark-mode .nav-user-info .btn-outline {
    color: var(--dark-color); /* Outline buttons in dark mode also use the --dark-color for text */
    border-color: var(--dark-color);
}
.dark-mode .nav-user-info .btn-outline:hover {
    background: var(--dark-color);
    color: var(--light-color); /* Text should be light on hover */
}


/* === NEW STYLES FOR PRODUCT CARDS IN DARK MODE (no lines) === */
.dark-mode .product-card {
    background: var(--card-bg);
    border: 1px solid #333;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    position: relative; 
    overflow: hidden; 
    padding: 3rem 1.5rem;
}
.dark-mode .product-card:hover {
    background: #2c2c2c;
    border-color: #444;
    transform: translateY(-5px);
}
/* Hide the side line in dark mode */
.dark-mode .product-card::before {
    background-color: transparent; /* Makes the line transparent */
}
.dark-mode .product-card-link:nth-child(odd) .product-card .icon { 
    color: var(--primary-color); 
}
.dark-mode .product-card-link:nth-child(even) .product-card .icon { 
    color: var(--accent-color); 
}
.dark-mode .product-card h3 { 
    color: var(--dark-color); 
    margin: 0; 
}

/* Basic form styling for tools */
.tool-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid #eee;
    border-radius: 10px;
    background-color: #fcfcfc;
}
.dark-mode .tool-form {
    background-color: #2b2b2b;
    border-color: #444;
}
.tool-form .form-group label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: block;
}
.tool-form .form-group input[type="number"],
.tool-form .form-group input[type="text"],
.tool-form .form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
}
.dark-mode .tool-form .form-group input,
.dark-mode .tool-form .form-group select {
    background-color: #333;
    border-color: #555;
    color: var(--dark-color);
}
.tool-form .btn {
    align-self: flex-start; /* Align button to the left */
}

/* General results container styling for all tools */
.tool-results {
    margin-top: 2rem; 
    padding: 1.5rem;
    border-radius: 10px;
    color: var(--dark-color);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Light mode common rules for result boxes */
/* This is for green-logo tools (AgriSolar, SolarPay, SolarEd) - Blue themed results */
.tool-results {
    background-color: #e9f5ff; /* Light blue background */
    border: 1px solid var(--primary-color); /* Blue border */
}
.tool-results strong {
    color: var(--primary-color); /* Blue strong color */
}


/* Specific styling for AgriSolar results (Green icon in ecosystem -> Blue themed results) */
/* This is implicitly covered by .tool-results general rules */
/*
.agri-solar-results {
    background-color: #e9f5ff;
    border: 1px solid var(--primary-color);
}
.agri-solar-results strong {
    color: var(--primary-color);
}
*/


/* Specific styling for EcoMeter results (Blue icon in ecosystem -> Green themed results) */
#eco-meter-results {
    background-color: #e6ffe6; /* Light green */
    border-color: var(--accent-color); /* Green */
}
#eco-meter-results strong {
    color: var(--accent-color); /* Green */
}

/* Specific styling for GreenCell results (Blue icon in ecosystem -> Green themed results) */
#green-cell-results {
    background-color: #e6ffe6; /* Light green */
    border-color: var(--accent-color); /* Green */
}
#green-cell-results strong {
    color: var(--accent-color); /* Green */
}

/* Specific styling for SolarAI results (Blue icon in ecosystem -> Green themed results) */
#solar-ai-results {
    background-color: #e6ffe6; /* Changed from light blue to light green */
    border-color: var(--accent-color); /* Changed from blue to green */
}
#solar-ai-results h4 { 
    color: var(--accent-color); /* Changed from blue to green */
    border-bottom: 1px dashed rgba(40, 167, 69, 0.3); /* Green dashed line */
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
#solar-ai-results ul li strong { 
    color: var(--accent-color); /* Changed from blue to green */
}

/* Specific styling for SolarPay results (Green icon in ecosystem -> Blue themed results) */
/* This is implicitly covered by .tool-results general rules */
/*
#results-container { 
    background-color: #e9f5ff;
    border-color: var(--primary-color);
}
#results-container strong {
    color: var(--primary-color);
}
*/

/* SolarEd specific styles (Green icon in ecosystem -> Blue themed results) */
.topic-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
    justify-content: center;
}
.topic-btn {
    background-color: var(--light-color);
    color: var(--dark-color);
    border: 1px solid var(--primary-color); /* Blue themed buttons */
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.topic-btn:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}
.topic-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}
.solar-ed-content { 
    margin-top: 2rem;
    padding: 2rem;
    background-color: #f7faff; /* Light blue */
    border: 1px solid var(--primary-color); /* Blue */
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.7;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.solar-ed-content h3 {
    font-size: 1.8rem;
    color: var(--primary-color); /* Blue */
    margin-bottom: 1rem;
    text-align: center; 
}
.solar-ed-content p {
    margin-bottom: 1rem;
    text-align: justify; 
}
.solar-ed-content a {
    color: var(--primary-color); /* Blue */
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
}
.solar-ed-content a:hover {
    text-decoration: underline;
}


/* Dark mode adjustments for results containers */
body.dark-mode .tool-results {
    color: var(--dark-color); /* Light text for dark mode */
}

/* Dark mode common rules for result boxes */
/* This is for green-logo tools (AgriSolar, SolarPay, SolarEd) */
body.dark-mode .tool-results {
    background-color: #1f2733; /* Dark blue background */
    border-color: var(--primary-color); /* Blue border */
}
body.dark-mode .tool-results strong {
    color: var(--primary-color); /* Blue strong color */
}

/* Dark mode specific for AgriSolar results */
/* Implicitly covered by general .tool-results dark mode */
/*
body.dark-mode .agri-solar-results {
    background-color: #1f2733; 
    border-color: var(--primary-color); 
}
*/

/* Dark mode specific for EcoMeter results (Blue icon in ecosystem -> Green themed results) */
body.dark-mode #eco-meter-results {
    background-color: #1f3325; /* Dark green */
    border-color: var(--accent-color); /* Green */
}
body.dark-mode #eco-meter-results strong {
    color: var(--accent-color); /* Green */
}

/* Dark mode specific for GreenCell results (Blue icon in ecosystem -> Green themed results) */
body.dark-mode #green-cell-results {
    background-color: #1f3325; /* Dark green */
    border-color: var(--accent-color); /* Green */
}
body.dark-mode #green-cell-results strong {
    color: var(--accent-color); /* Green */
}

/* Dark mode specific for SolarAI results (Blue icon in ecosystem -> Green themed results) */
body.dark-mode #solar-ai-results {
    background-color: #1f3325; /* Changed from dark blue to dark green */
    border-color: var(--accent-color); /* Changed from blue to green */
}
body.dark-mode #solar-ai-results h4 {
    color: var(--accent-color); /* Changed from blue to green */
    border-bottom-color: rgba(40, 167, 69, 0.5); /* Green dashed line */
}
body.dark-mode #solar-ai-results ul li strong {
    color: var(--accent-color); /* Changed from blue to green */
}

/* Dark mode specific for SolarPay results */
/* Implicitly covered by general .tool-results dark mode */
/*
body.dark-mode #results-container {
    background-color: #1f2733;
    border-color: var(--primary-color);
}
body.dark-mode #results-container strong {
    color: var(--primary-color);
}
*/

/* Dark mode for SolarEd */
.dark-mode .topic-btn {
    background-color: #333;
    color: var(--dark-color);
    border-color: #555;
    box-shadow: none;
}
.dark-mode .topic-btn:hover,
.dark-mode .topic-btn.active {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}
.dark-mode .solar-ed-content {
    background-color: #2a2a3a;
    border-color: var(--primary-color);
    color: var(--text-color);
}
.dark-mode .solar-ed-content h3 {
    color: var(--primary-color);
}
.dark-mode .solar-ed-content a {
    color: var(--primary-color);
}


/* Ensure the hr separating sections looks good in dark mode */
.dark-mode hr {
    border-color: #444 !important;
}


/* Responsive */
@media (max-width: 768px) {
    .navbar { flex-direction: column; align-items: stretch; }
    .nav-menu { flex-direction: column; gap: 1rem; margin-top: 1rem; align-items: center; }
    .nav-links { flex-direction: column; text-align: center; }
    .nav-controls { justify-content: center; margin-top: 1rem; }
    .nav-auth { margin-top: 0; }
    .hero h1 { font-size: 2.5rem; }
    /* Adjust topic buttons for small screens */
    .topic-selector {
        flex-direction: column;
        align-items: center;
    }
    .topic-btn {
        width: 100%; 
        max-width: 250px; 
    }
}