/* Main Styles */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --background-color: #f5f6fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 70px;
}

/* Navigation */
.nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.nav.active {
    right: 0;
}

.nav-brand {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand img {
    height: 40px;
    width: auto;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
    margin: 0;
    list-style: none;
}

.nav-item {
    width: 100%;
}

.nav-item a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.nav-item a i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: #666;
    transition: color 0.2s ease;
}

.nav-item a:hover {
    background: rgba(74, 144, 226, 0.08);
    color: var(--primary-color);
}

.nav-item a:hover i {
    color: var(--primary-color);
}

.nav-item a.active {
    background: var(--primary-color);
    color: white;
}

.nav-item a.active i {
    color: white;
}

/* Dropdown Navigation */
.dropdown > a {
    position: relative;
}

.dropdown > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.dropdown.active > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    padding: 0.5rem 0 0.5rem 2.5rem;
    margin: 0.25rem 0;
    list-style: none;
    border-left: 2px solid rgba(74, 144, 226, 0.2);
    display: none;
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
}

/* Hamburger Menu */
.hamburger {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
}

.hamburger:hover {
    background: #f8f9fa;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active {
    right: 320px;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Content Adjustment */
.main-content {
    transition: margin-right 0.3s ease;
}

.main-content.nav-active {
    margin-right: 300px;
}

@media (max-width: 768px) {
    .nav {
        width: 280px;
        right: -280px;
    }
    
    .hamburger.active {
        right: 290px;
    }
    
    .main-content.nav-active {
        margin-right: 0;
    }
}

.tool-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tool-title {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
    margin-bottom: 1.5rem;
}

.drop-zone:hover {
    border-color: var(--secondary-color);
    background-color: rgba(74, 144, 226, 0.05);
}

.drop-zone.drag-over {
    border-color: var(--success-color);
    background-color: rgba(39, 174, 96, 0.05);
}

/* Buttons */
.btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #357abd;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Progress Bar */
.progress-container {
    margin: 1rem 0;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    width: 0%;
    height: 100%;
    background-color: var(--success-color);
    transition: width 0.3s;
}

/* File List */
.file-list {
    margin: 1rem 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.file-item .remove-file {
    color: var(--error-color);
    cursor: pointer;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.message.error {
    background-color: #fde8e8;
    color: var(--error-color);
    border: 1px solid #fbd5d5;
}

.message.success {
    background-color: #e8f5e9;
    color: var(--success-color);
    border: 1px solid #c8e6c9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
    }

    .tool-section {
        padding: 1rem;
    }
}

/* Options Section */
.options-section {
    margin: 1rem 0;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.option-group select,
.option-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Loading Spinner */
.spinner {
    display: none;
    width: 40px;
    height: 40px;
    margin: 1rem auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.feature-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    line-height: 1.5;
}

.feature-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Call to Action */
.cta-section {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #f8f9fa;
    margin-top: 2rem;
}

.cta-section h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.cta-section p {
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.cta-btn:hover {
    background: #357abd;
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        padding: 1rem 0.5rem;
    }

    .feature-card {
        padding: 1.25rem;
    }
}

/* Footer */
footer {
    background: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

footer .container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    padding-top: 0;
    position: relative;
}

.footer-section {
    padding: 0;
}

.footer-section h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-section p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    max-width: 90%;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-links i {
    font-size: 1rem;
    width: 16px;
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.footer-social a {
    color: #666;
    text-decoration: none;
    font-size: 1.4rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f6fa;
}

.footer-social a:hover {
    color: var(--primary-color);
    background: rgba(74, 144, 226, 0.1);
    transform: translateY(-3px);
}

.footer-bottom {
    grid-column: 1 / -1;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.footer-bottom p {
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    footer .container {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-section:first-child {
        grid-column: 1 / -1;
    }
    
    .footer-section p {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    footer .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links a {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }
    
    .footer-section p {
        margin-left: auto;
        margin-right: auto;
    }
}