:root {
    --bg-dark: #0f0c29;
    --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #00d2ff;
    --secondary: #928DAB;
    --accent: #3a7bd5;
    --text: #ffffff;
    --text-muted: #b3b3b3;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2vh 0;
    width: 100%;
}

/* Glassmorphism Container */
.glass-container {
    width: 95vw;
    height: auto;
    min-height: 96vh;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: flex;
    overflow: visible;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Sidebar */
.sidebar {
    width: 350px;
    padding: 30px;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
}

.logo span {
    color: var(--primary);
}

.logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.form-row {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-glass {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 12px;
    color: white;
    outline: none;
    transition: 0.3s;
}

.input-glass:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
}

.input-glass::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

select.input-glass {
    appearance: none;
    /* color: white; */
}

select.input-glass option {
    background: #24243e;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.02);
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

#previewImage {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border: none;
    padding: 15px;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 10px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.main-content::-webkit-scrollbar {
    display: none;
}

.header-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.badge {
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.highlight-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card .value {
    font-size: 1.8rem;
    font-weight: 700;
    background: -webkit-linear-gradient(var(--primary), white);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card .value.sub {
    font-size: 1.2rem;
    -webkit-text-fill-color: var(--text);
}

.chart-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    height: 350px;
    /* Fixed height for stability */
    margin-bottom: 15px;
    position: relative;
    /* Important for Chart.js responsive mode */
}

.ai-insight {
    margin-top: 20px;
    padding: 20px;
    border-radius: 16px;
    background: rgba(58, 123, 213, 0.1);
    border: 1px solid rgba(58, 123, 213, 0.3);
}

.ai-insight h3 {
    margin-bottom: 10px;
    color: var(--primary);
}

.ai-insight p {
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Loader */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- LANDING PAGE STYLES --- */
.landing-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-gradient);
    z-index: 100;
    padding-bottom: 20px;
}

.landing-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    position: relative;
    z-index: 2;
}

.landing-page.reset-mode {
    justify-content: center;
}

.landing-page.reset-mode .landing-container {
    padding-top: 0;
    justify-content: center;
    height: 100vh;
}

.landing-hero {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .landing-hero {
        padding: 60px 15px;
    }
    .landing-hero h2 {
        font-size: 1.8rem;
    }
    .landing-features {
        padding: 20px 10px;
    }
    .feature-card {
        padding: 30px 15px;
        flex-direction: column !important;
    }
    .feature-visual {
        width: 100% !important;
        margin-top: 20px;
    }
    .mock-table-container {
        font-size: 0.75rem;
        overflow-x: auto;
    }
    .floating-blobs {
        display: none; /* Hide blobs on small mobile to avoid overflow issues */
    }
}

.logo-large h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
}

.logo-large span {
    color: var(--primary);
}

.landing-hero h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 300;
    color: var(--text);
}

.landing-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 1.6;
}

.auth-box {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.card-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 15px;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

.auth-tab.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    background: rgba(0, 210, 255, 0.05);
}

.auth-form {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.auth-form .btn-primary {
    margin-top: 10px;
}

/* Background Animations */
.floating-blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite alternate;
}

.blob.color-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob.color-2 {
    width: 500px;
    height: 500px;
    background: #6c5ce7;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Feature Showcase */
.landing-features {
    width: 100%;
    max-width: 1100px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-bottom: 60px;
}

.features-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.feature-card.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
}

.feature-text h3 {
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.feature-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.feature-visual {
    flex: 1.2;
    padding: 2px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.feature-visual-inner {
    background: #1a1a2e;
    border-radius: 14px;
    padding: 20px;
    height: 100%;
}

.mock-table-container {
    overflow-x: auto;
}


/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    /* Controlled by JS as flex */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-container {
    width: 100%;
    max-width: 500px;
}

.modal-content {
    background: rgba(30, 30, 50, 0.9);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    body {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 10px;
    }

    .glass-container {
        width: 100%;
        height: auto;
        flex-direction: column;
        border-radius: 16px;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 20px;
        overflow-y: visible;
    }

    .main-content {
        padding: 20px;
        overflow-y: visible;
    }

    .highlight-cards {
        grid-template-columns: 1fr;
    }



    /* Landing Page Mobile */
    .landing-page {
        position: fixed;
        height: 100vh;
        width: 100%;
        overflow-y: auto;
        padding-top: 10px;
    }

    .landing-hero {
        margin-bottom: 20px;
        padding: 10px;
    }
    
    .landing-features {
        gap: 40px;
        margin-bottom: 40px;
    }

    .feature-card, .feature-card.reverse {
        flex-direction: column;
        gap: 15px;
    }

    .features-title {
        font-size: 1.8rem;
    }

    .feature-text h3 {
        font-size: 1.5rem;
    }

    .logo-large h1 {
        font-size: 2.5rem;
    }

    .landing-hero h2 {
        font-size: 1.4rem;
    }

    .landing-hero p {
        font-size: 1rem;
    }

    .auth-box {
        padding: 20px;
    }
}

/* --- COMPARABLES TABLE --- */
.comparable-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.comparable-table th,
.comparable-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparable-table th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparable-table td {
    font-size: 0.95rem;
    color: var(--text);
}

.comparable-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sim-score {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.btn-outline {
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

/* --- FOOTER --- */
.landing-footer {
    width: 100%;
    max-width: 1100px;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    z-index: 2;
    position: relative;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

/* --- CONTACT PAGE --- */
.contact-container {
    max-width: 800px;
    width: 90%;
    margin: 50px auto;
    animation: fadeIn 0.8s ease-out;
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-header h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form .form-group.full-width {
    grid-column: span 2;
}

.contact-form textarea.input-glass {
    min-height: 150px;
    resize: vertical;
}

.contact-form .btn-primary {
    grid-column: span 2;
    width: 100%;
    font-size: 1.1rem;
    padding: 18px;
    margin-top: 10px;
}

#contactStatus {
    grid-column: span 2;
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .contact-form {
        grid-template-columns: 1fr;
    }
    .contact-form .form-group.full-width {
        grid-column: span 1;
    }
    .contact-form .btn-primary {
        grid-column: span 1;
    }
}