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

body {
    background: linear-gradient(135deg, #0061ff 0%, #6747c7 100%);
    min-height: 100vh;
    color: #333;
}

.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 60px;
}

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

.logo {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
    margin-right: 0.5rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #0061ff;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    padding: 2rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

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

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.instructions {
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}


.converter-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed #ccc;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.upload-box:hover {
    border-color: #0061ff;
    background: #f8f9fa;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.upload-box h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.upload-box p {
    color: #666;
}

.format-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.format-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: #f0f2f5;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.format-btn.disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.format-btn.active {
    background: #0061ff;
    color: white;
}

.convert-btn, .download-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background: #0061ff;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.convert-btn:hover, .download-btn:hover {
    background: #0052d9;
    transform: translateY(-2px);
}

.preview-container {
    margin-top: 2rem;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.preview-container h3 {
    margin-bottom: 1rem;
    color: #333;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.preview-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.preview-item img {
    width: 100%;
    height: auto;
    display: block;
}

footer {
    text-align: center;
    padding: 2rem;
    color: white;
    opacity: 0.8;
}

/* Drag and drop states */
.upload-box.drag-over {
    background: #f8f9fe;
    border-color: #0061ff;
    transform: scale(1.02);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-content {
        justify-content: space-between;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .format-options {
        gap: 0.5rem;
    }
    
    .format-btn {
        padding: 0.6rem 1rem;
    }
}

.files-container {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-box {
    background: #f8f9fe;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    background: #0061ff;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 1.2rem;
}

.file-name {
    font-weight: 500;
}

.file-status {
    color: #666;
    font-size: 0.9rem;
}

.file-actions {
    display: flex;
    gap: 1rem;
}

.download-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background: #0061ff;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #0052d9;
}

.remove-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    background: #ff4444;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.remove-btn:hover {
    background: #cc0000;
}

.download-all-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background: #0061ff;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.progress-container {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    margin: 8px 0;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #0061ff;
    transition: width 0.3s ease;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-status {
    color: #666;
    font-size: 0.9rem;
}

.download-btn {
    min-width: 140px;
    text-align: center;
}

.file-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-section {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 2rem;
    color: white;
    text-align: center;
}

.content-section h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: rgba(255, 255, 255, 0.95);
}

.content-section h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.content-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .content-section {
        padding: 0 1rem;
    }
}

img {
    width: 100%;
    height: auto;
    aspect-ratio: attr(width) / attr(height);
}

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

.social-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Mobile Navigation */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    position: relative;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #0061ff;  /* Brand color blue */
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
}

/* X animation when menu is active */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-content {
        padding: 0.5rem 1rem;
        justify-content: space-between;
        align-items: center;
        flex-direction: row;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .hero {
        padding: 1rem 0;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .instructions {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        padding: 0 1rem;
    }

    .converter-container {
        margin-top: 1rem;
        padding: 1rem;
    }

    .upload-box {
        padding: 1.5rem 1rem;
    }

    /* Fix zoom issues */
    .file-box {
        font-size: 14px;
        padding: 0.75rem;
    }

    .file-actions button {
        padding: 0.5rem;
        min-width: auto;
    }

    .remove-btn {
        font-size: 16px;
        width: 24px;
        height: 24px;
    }

    /* Prevent zoom on tap */
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    button {
        font-size: 16px;
    }
}

.mobile-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-selector {
    position: relative;
    margin-left: 0.5rem;
}

.lang-btn {
    background: #0061ff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.35rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    height: 32px;
}

.lang-btn:hover {
    background: #0052d6;
}

.arrow {
    font-size: 0.8rem;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 150px;
    z-index: 1000;
    margin-top: 0.5rem;
}

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

.lang-option {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.lang-option:hover {
    background: #f5f5f5;
}

.lang-option.active {
    background: #e6f0ff;
    color: #0061ff;
}

@media (max-width: 768px) {
    .language-selector {
        margin-left: 0;
    }
    
    .lang-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.9rem;
        height: 28px;
    }

    .mobile-controls {
        gap: 0.35rem;
    }
}

/* 404 Page Styles */
.error-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1;
}

.error-message {
    font-size: 1.5rem;
    color: white;
    margin: 1rem 0 2rem;
}

.home-button {
    display: inline-block;
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.home-button:hover {
    background-color: #1d4ed8;
}

@media (max-width: 640px) {
    .error-code {
        font-size: 6rem;
    }
    
    .error-message {
        font-size: 1.25rem;
    }
}