/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary-color: #2563eb;      /* Modern blue */
    --primary-dark: #1d4ed8;       /* Darker blue for hover states */
    --primary-light: #dbeafe;      /* Light blue for backgrounds */
    
    /* Secondary Colors */
    --secondary-color: #7c3aed;    /* Vibrant purple */
    --secondary-dark: #6d28d9;     /* Darker purple for hover */
    --secondary-light: #ede9fe;    /* Light purple for accents */
    
    /* Accent Colors */
    --accent-color: #f43f5e;       /* Modern pink/rose */
    --accent-dark: #e11d48;        /* Darker pink for hover */
    --accent-light: #fce7f3;       /* Light pink for highlights */
    
    /* Neutral Colors */
    --text-color: #1f2937;         /* Dark gray for text */
    --text-light: #6b7280;         /* Light gray for secondary text */
    --background: #f8fafc;         /* Light background */
    --white: #ffffff;              /* Pure white */
    
    /* UI Elements */
    --border-color: #e2e8f0;       /* Light gray for borders */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
}

/* Header and Navigation */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Style the logo container */
.logo {
    display: flex;
    align-items: center; /* Vertically centers the image and text */
}

/* Style the logo image */
.logo-image {
    width: 150px; /* Increased from 50px to 150px (3x) */
    height: auto; /* Maintains the image's aspect ratio */
    margin-right: 15px; /* Slightly increased for better spacing */
}

@media (max-width: 600px) {
    .logo-image {
        width: 120px; /* Increased from 40px to 120px (3x) */
    }
    .logo h1 {
        font-size: 1.2rem; /* Unchanged, but can adjust if needed */
    }
}

/* Main Content */
main {
    margin-top: 80px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Analysis Section */
.analysis-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.input-container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    max-width: 100%; /* Prevents overflow */
}

#url-input {
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    font-size: 1.1rem;
    height: 48px;
}

.results-container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

textarea {
    width: 100%;
    min-height: 50px;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.results-box {
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-top: 1rem;
    background-color: var(--background);
}

.placeholder-text {
    color: var(--text-light);
    text-align: center;
    margin-top: 2rem;
}
#loading {
    text-align: center;
    padding: 1rem;
    font-size: 1.2em;
    color: var(--primary-color);
}
/* About Section */
.about-section {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 10px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-color);
}

.about-section h2,
.about-section h3 {
    margin-bottom: 1.5rem; /* Adds space below <h2> and <h3> */
}

.about-section p {
    margin-top: 0; /* Ensures no extra top margin on paragraphs */
    margin-bottom: 1rem; /* Adds space below paragraphs */
}
/* Contact Section */
.contact-section {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 10px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto;
}

#contact-form input,
#contact-form textarea {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

#contact-form textarea {
    min-height: 150px;
}
/* Blog Section */
.blog-section {
    padding: 20px;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.blog-card {
    text-decoration: none;
    color: inherit;
}
.blog-thumbnail {
    max-width: 100%;
    height: auto;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    margin-left: 1rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}
/* Footer Logo */
.footer-logo {
    width: 24px; /* Adjust size as needed (e.g., 32px, 40px) */
    height: auto; /* Maintains aspect ratio */
    vertical-align: middle; /* Aligns logo with text */
    margin-left: 0.5rem; /* Adds space between text and logo */
}
/* Loading State */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .analysis-section {
        grid-template-columns: 1fr;
    }

    nav {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        margin-top: 1rem;
    }

    .nav-links a {
        margin: 0 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        margin-top: 1rem;
    }

    .footer-links a {
        margin: 0 0.5rem;
    }
}

/* Report Styles */
.report-container {
    margin-top: 30px;
}

.report-toggle {
    margin-bottom: 15px;
}

.report {
    white-space: pre-wrap;
    background-color: var(--white);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-family: monospace;
    display: none;
}

/* Misinformation Results Styles */
.misinformation-header {
    color: var(--accent-color, #f43f5e); /* Modern pink/rose */
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
}

.no-misinformation {
    color: green;
    font-weight: bold;
    margin-top: 10px;
}

.misinformation-list {
    margin-top: 20px;
}

.misinformation-item {
    padding-bottom: 60px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 20px;
}

.misinformation-item:last-child {
    border-bottom: none; /* Remove border from the last item */
}

.statement-label,
.counter-args-label {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color, #2563eb); /* Modern blue */
    margin-bottom: 5px;
}

.category-label,
.confidence-label {
    font-size: 0.9em;
    color: var(--text-light, #6b7280); /* Light gray */
    margin-bottom: 5px;
}

.statement-text {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.counter-args-list {
    margin-left: 20px;
    list-style-type: disc;
    margin-bottom: 10px;
}

.sources-label {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color, #2563eb);
    margin-top: 10px;
    margin-bottom: 5px;
}

.sources-list {
    margin-left: 20px;
    list-style-type: disc;
    margin-bottom: 10px;
}

.detected-text-label,
.similar-misinformation-label {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color, #2563eb);
    margin-bottom: 5px;
}

.chunk {
    padding: 10px;
    background-color: #f4f6f7;
    border-radius: 4px;
    margin: 10px 0;
}

.statement {
    padding: 10px;
    background-color: #ebf5fb;
    border-radius: 4px;
    border-left: 3px solid #3498db;
    margin: 10px 0;
}


/* Links in Sources */
.results-box a {
    color: var(--primary-color); /* #2563eb, modern blue */
    text-decoration: underline;
}

.results-box a:hover {
    color: var(--primary-dark); /* #1d4ed8, darker blue */
}