/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header */
.header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 20px;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-search {
    flex: 1;
    max-width: 400px;
}

.header-search .search-container {
    max-width: 100%;
}

.header-search .search-wrapper {
    padding: 0 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.header-search #toolSearch {
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
}

.header-search .search-icon {
    font-size: 1rem;
}

.header-search .search-results {
    top: calc(100% + 10px);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.logo h1 {
    color: #2563eb;
    font-size: 1.6rem;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.lang-switcher {
    margin-left: 0.5rem;
}

.lang-select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 0.85rem;
    color: #334155;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.lang-select:hover {
    border-color: #2563eb;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #2563eb;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

/* Search Bar Styles */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 100;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 0 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    transform: translateY(-2px);
}

.search-icon {
    color: #94a3b8;
    font-size: 1.2rem;
}

#toolSearch {
    width: 100%;
    border: none;
    padding: 1.2rem 1rem;
    font-size: 1.1rem;
    outline: none;
    background: transparent;
    color: #1e293b;
}

.search-results {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 101;
    text-align: left;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #334155;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8fafc;
    color: #2563eb;
    padding-left: 2rem;
}

.search-result-item i {
    margin-right: 1rem;
    font-size: 0.9rem;
    color: #64748b;
}

.no-results {
    padding: 1.5rem;
    color: #64748b;
    text-align: center;
}

/* Converter Section */
.converter-section {
    padding: 4rem 0;
}

.converter-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.converter-header {
    text-align: center;
    margin-bottom: 2rem;
}

.converter-header h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.converter-selectors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.format-selector {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    min-width: 180px;
    transition: border-color 0.3s ease;
}

.format-selector:focus {
    outline: none;
    border-color: #2563eb;
}

.arrow-icon {
    color: #6b7280;
    font-size: 1.2rem;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #d1d5db;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 2rem;
}

.upload-area:hover {
    border-color: #2563eb;
    background-color: #f8fafc;
}

.upload-area.dragover {
    border-color: #2563eb;
    background-color: #eff6ff;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    font-size: 3rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.upload-area h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.choose-file-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.choose-file-btn:hover {
    background: #1d4ed8;
}

.supported-formats {
    font-size: 0.9rem;
    color: #9ca3af;
}

/* File List */
.file-list {
    margin-bottom: 2rem;
}

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

.file-name {
    font-weight: 500;
    color: #333;
}

.file-size {
    color: #6b7280;
    font-size: 0.9rem;
}

.remove-file {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Convert Button */
.convert-btn-container {
    text-align: center;
    margin-bottom: 2rem;
}

.convert-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.convert-btn:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
}

.convert-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Download Area */
.download-area {
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.download-area h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.download-files {
    margin-bottom: 1.5rem;
}

.download-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.download-all-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.download-all-btn:hover {
    background: #1d4ed8;
}

/* Detailed Information Section Styles */
.info-section {
    padding: 4rem 0;
    background-color: #fff;
    border-top: 1px solid #f1f5f9;
}

.info-content {
    max-width: 900px;
    margin: 0 auto;
    color: #475569;
}

.info-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.info-content h2 {
    color: #1e293b;
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    font-weight: 700;
}

.info-content code {
    background-color: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: #2563eb;
    font-weight: 600;
}

@media (max-width: 768px) {
    .info-content h2 {
        font-size: 1.6rem;
    }
    
    .info-content p {
        font-size: 1rem;
    }
}

/* Features Section */
.features-section {
    background: white;
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 3rem;
}

.tools-section {
    background: #f8f9fa;
    padding: 4rem 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.tool-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card a {
    display: block;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Steps (Featured Tool) */
.steps-section {
    background: #ffffff;
    padding: 3rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cta-btn {
    background: #2563eb;
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.cta-btn:hover {
    background: #1d4ed8;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.step-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.2rem;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.step-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.step-card p {
    color: #6b7280;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.faq-item h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.faq-item p {
    color: #6b7280;
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials-section {
    background: white;
    padding: 4rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.stars {
    color: #fbbf24;
    margin-bottom: 1rem;
}

.testimonial-card p {
    color: #333;
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-author strong {
    color: #333;
    display: block;
    margin-bottom: 0.5rem;
}

.testimonial-author span {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .header-container {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
    }
    
    .header-search {
        max-width: 100%;
        width: 100%;
        order: 2;
    }
    
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .logo {
        order: 1;
    }

    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .converter-selectors {
        flex-direction: column;
        gap: 1rem;
    }
    
    .format-selector {
        min-width: 100%;
    }
    
    .arrow-icon {
        transform: rotate(90deg);
    }
    
    .features-grid,
    .faq-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .converter-box {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .converter-section,
    .features-section,
    .faq-section,
    .testimonials-section {
        padding: 2rem 0;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
}

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

.loading {
    animation: spin 1s linear infinite;
}

/* Success Animation */
@keyframes success {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-animation {
    animation: success 0.5s ease-out;
}
