/* --- Global & Shared Styles --- */
:root {
    --primary-color: #0a4d68;
    --secondary-color: #088395;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, sans-serif;
    background-color: var(--light-color);
    line-height: 1.6;
    color: #333;
}

body.menu-open {
    overflow: hidden;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

#overlay.active {
    display: block;
}

/* --- Header & Navigation --- */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container-nav { /* Renamed to avoid conflict */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 65px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 45px;
    width: auto;
}

.logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.primary-menu .nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.primary-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

.primary-menu a:hover {
    color: var(--secondary-color);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 260px;
    box-shadow: var(--box-shadow);
    z-index: 1;
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    margin-top: 10px;
    border: 1px solid #eee;
}

.dropdown-content a {
    color: var(--dark-color);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: var(--light-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown .dropbtn i {
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropbtn i {
    transform: rotate(180deg);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

/* --- Main Content & Analyzer Styles --- */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: calc(100vh - 135px); /* Full height minus header and footer */
}

.analyzer-container { /* Renamed for clarity */
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 700px;
    text-align: center;
}
.analyzer-container h1 {
    color: #1a2533;
    margin-bottom: 10px;
}
.analyzer-container p {
    color: #555;
    line-height: 1.6;
}
.analyzer-container input[type="file"] {
    display: block;
    margin: 30px auto 20px;
    border: 2px dashed #ccc;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
}
.analyzer-container input[type="file"]::file-selector-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.analyzer-container input[type="file"]::file-selector-button:hover {
    background-color: var(--secondary-color);
}
.analyzer-container button {
    background-color: #28a745;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.analyzer-container button:hover {
    background-color: #218838;
}
.hidden {
    display: none;
}
#results {
    margin-top: 30px;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
#results h3 {
    color: var(--primary-color);
}
#results p, #results ul {
    background-color: #f4f7f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}
#results ul {
    list-style-position: inside;
    padding-left: 20px;
}
#results li {
    margin-bottom: 10px;
}
#loading {
    margin-top: 20px;
    color: #555;
}

/* --- Footer Styles --- */
.footer {
    background-color: var(--dark-color);
    color: #ccc;
    padding: 40px 0 20px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #555;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px 20px;
}

.footer-logo { font-size: 1.2rem; font-weight: 700; color: #fff; }
.footer-menu a { color: #ccc; text-decoration: none; margin-left: 20px; transition: color 0.3s ease; }
.footer-menu a:hover { color: #fff; }
.copyright { text-align: center; margin-top: 20px; font-size: 0.9rem; }

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    .logo span { font-size: 1.2rem; }
    .logo img { height: 35px; }
    
    .mobile-menu-toggle { display: block; }

    .primary-menu {
        position: fixed; top: 0; right: 0;
        width: min(80vw, 320px); height: 100vh;
        background-color: #fff; z-index: 999;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .primary-menu.active { transform: translateX(0); }
    
    .primary-menu .nav-links {
        flex-direction: column; align-items: flex-start;
        gap: 0; padding: 2rem;
    }

    .primary-menu li { width: 100%; text-align: left; }
    .primary-menu a { padding: 1rem 0; display: block; width: 100%; font-size: 1.1rem; }
    .dropdown:hover .dropdown-content { display: none; }
    
    .dropdown-content {
        position: static; display: none; box-shadow: none;
        background-color: #f7f7f7; width: 100%;
        border-radius: 0; margin-top: 0;
        padding: 0; padding-left: 1rem; 
    }
    
    .dropdown.active > .dropdown-content { display: block; }
    .dropdown.active > a > i { transform: rotate(180deg); }
    .dropdown .dropbtn { display: flex; justify-content: space-between; align-items: center; width: 100%; }

    .footer-content { flex-direction: column; text-align: center; }
    .footer-menu a { margin: 0 10px; display: inline-block; padding: 5px 0; }
}