/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-color: #95a5a6;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--border-radius);
    z-index: 10000;
    transition: var(--transition);
}

.skip-link:focus {
    top: 10px;
}

/* Layout */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-link:hover {
    background: var(--light-color);
    color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.header-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.header-content h1 i {
    font-size: 3.5rem;
}

.tagline {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.conversion-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    min-width: 150px;
    backdrop-filter: blur(10px);
}

.stat i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--light-color);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
}

.stat-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Converter Section */
.converter-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    margin: -5rem auto 3rem;
    box-shadow: var(--box-shadow);
    position: relative;
    max-width: 800px;
}

.converter-card {
    text-align: center;
}

.upload-area {
    border: 3px dashed var(--gray-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--secondary-color);
    background: var(--light-color);
}

.upload-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.file-types {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-success, .btn-cta {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
    border: 2px solid var(--gray-color);
}

.btn-secondary:hover {
    background: #bdc3c7;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-cta {
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    color: white;
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
}

.btn-cta:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

/* Selected Files */
.selected-files, .conversion-progress, .download-area {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.remove-file {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.remove-file:hover {
    background: rgba(231, 76, 60, 0.1);
}

.conversion-options {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    text-align: left;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.option-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.option-group select {
    margin-left: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Progress Bar */
.conversion-progress {
    padding: 2rem;
}

.progress-container {
    background: var(--light-color);
    border-radius: 50px;
    height: 20px;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--secondary-color), var(--success-color));
    height: 100%;
    width: 0%;
    border-radius: 50px;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--dark-color);
    font-weight: bold;
}

.converting-text {
    font-size: 1.2rem;
    color: var(--gray-color);
}

/* Download Area */
.download-area {
    padding: 3rem 2rem;
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.download-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    background: white;
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid #eee;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* How It Works */
.how-it-works {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--light-color), #dfe6e9);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    position: relative;
    box-shadow: var(--box-shadow);
}

.step-number {
    position: absolute;
    top: -20px;
    left: -20px;
    background: var(--secondary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.step-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Tools Section */
.tools-section {
    padding: 4rem 0;
    background: white;
}

.tools-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.tool-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tool-card p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: var(--light-color);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 500px;
}

.faq-answer p {
    color: var(--gray-color);
    line-height: 1.8;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
}

.footer-content {
    padding: 3rem 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Advertisements - Same as previous */
.ad-container {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

.ad-left {
    left: 20px;
}

.ad-right {
    right: 20px;
}

.ad-bottom {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-top: 2px solid #e9ecef;
}

.ad-banner {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.ad-in-content {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.footer-ad {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.ad-placeholder {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.ad-placeholder:hover {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}

.ad-label {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #6c757d;
    color: white;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.ad-content {
    color: #6c757d;
    font-size: 14px;
}

.ad-content p {
    margin: 5px 0;
}

/* Left and Right Ads */
.ad-left .ad-placeholder,
.ad-right .ad-placeholder {
    width: 160px;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ad-banner .ad-placeholder {
    width: 728px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-in-content .ad-placeholder {
    width: 300px;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-ad .ad-placeholder {
    width: 728px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-bottom .ad-placeholder {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .ad-left,
    .ad-right {
        display: none;
    }
    
    .ad-bottom {
        display: block;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .header-content h1 {
        font-size: 2rem;
        flex-direction: column;
    }
    
    .conversion-stats {
        gap: 1rem;
    }
    
    .stat {
        min-width: 120px;
        padding: 1rem;
    }
    
    .converter-section {
        padding: 1.5rem;
        margin: -2rem auto 2rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary, .btn-success, .btn-cta {
        width: 100%;
        justify-content: center;
    }
    
    .features-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .step {
        margin: 0 1rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .ad-banner .ad-placeholder,
    .footer-ad .ad-placeholder {
        width: 100%;
        max-width: 320px;
        height: 100px;
    }
    
    .ad-in-content .ad-placeholder {
        width: 100%;
        max-width: 300px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .conversion-options {
        padding: 1rem;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .ad-bottom .ad-placeholder {
        height: 80px;
    }
}