/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    /* Light Mode Variables */
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    /* Indigo 700 */
    --secondary-color: #ec4899;
    /* Pink 500 */
    --bg-color: #f8fafc;
    /* Slate 50 */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border-color: #e2e8f0;
    /* Slate 200 */
    --header-bg: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --gradient-hero: linear-gradient(135deg, #4f46e5 0%, #ec4899 100%);
}

[data-theme="dark"] {
    /* Dark Mode Variables */
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-hover: #818cf8;
    /* Indigo 400 */
    --secondary-color: #f472b6;
    /* Pink 400 */
    --bg-color: #0f172a;
    /* Slate 900 */
    --card-bg: #1e293b;
    /* Slate 800 */
    --text-main: #f1f5f9;
    /* Slate 100 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border-color: #334155;
    /* Slate 700 */
    --header-bg: rgba(15, 23, 42, 0.85);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --gradient-hero: linear-gradient(135deg, #312e81 0%, #831843 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-main);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    background: radial-gradient(circle at center, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subheadline {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto 4rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-left: 3rem;
    font-size: 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background-color: var(--card-bg);
    color: var(--text-main);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
}

/* Tool Grid */
.tools-section {
    padding: 2rem 0 6rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.tool-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-main);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.faq-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.faq-item p {
    color: var(--text-muted);
}

/* Footer */
footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tool Interface Page Styles */
.tool-interface {
    max-width: 800px;
    margin: 4rem auto;
    text-align: center;
    padding: 0 1.5rem;
}

.drop-zone {
    border: 3px dashed var(--border-color);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    margin: 2.5rem 0;
    background-color: var(--card-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.05);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.23);
    background-color: var(--primary-hover);
}

/* File List Styles */
.file-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.file-item i.fa-file-pdf {
    color: var(--secondary-color);
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.file-item span {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 1rem;
    font-size: 0.95rem;
}

.remove-file {
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.remove-file:hover {
    color: #ef4444;
    /* Red 500 */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu implementation usually requires JS to toggle */
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .tool-card {
        padding: 1rem;
    }

    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
}