:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #f94144;
    --border-radius: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --bg-color: #f0f2f5;
    --text-color: #212529;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #2b2d42;
    --footer-text: #ffffff;
    --input-bg: #ffffff;
    --input-border: #e9ecef;
}

.dark-mode {
    --bg-color: #121212;
    --text-color: #f8f9fa;
    --card-bg: #1e1e1e;
    --header-bg: #1a1a1a;
    --footer-bg: #0a0a0a;
    --footer-text: #e0e0e0;
    --input-bg: #2d2d2d;
    --input-border: #444;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

/* Header Styles */
header {
    background-color: var(--header-bg);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

/* Dropdown menu styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: var(--border-radius);
    right: 0;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

/* Main Content Styles */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 1rem auto;
    padding: 0 1rem;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

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

/* Upload Section Styles */
.upload-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.drag-drop-box {
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 4rem 2rem;
    margin: 0 auto 1.5rem;
    background-color: rgba(67, 97, 238, 0.05);
    transition: var(--transition);
    max-width: 600px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

/* Tool Sections */
.tool-section {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.tool-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
}

/* Preview Container */
.preview-container {
    width: 100%;
    height: 500px;
    margin: 1rem 0 1.5rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
}

/* Footer Styles */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 1rem;
    text-align: center;
    margin-top: auto;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .preview-container {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .upload-options {
        flex-direction: column;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
    }
}