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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    position: relative;
}

.lang-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.lang-toggle:hover {
    background: rgba(255,255,255,0.3);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

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

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f9f9ff;
}

.upload-content svg {
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.controls label {
    font-weight: 600;
}

.controls select,
.controls input[type="range"] {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.controls button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s;
}

.controls button:hover {
    background: #5568d3;
}

.controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.preview-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.preview-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.preview-info {
    padding: 1rem;
}

.preview-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.converted {
    color: #28a745;
    font-weight: 600;
}

.download-btn {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.download-btn:hover {
    background: #218838;
}

.features {
    margin-bottom: 3rem;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

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

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

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

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

.formats h2 {
    display: none;
}

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

.format-item {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.format-item h3 {
    color: #667eea;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.format-item p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.faq h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.faq details {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.faq details:last-child {
    border-bottom: none;
}

.faq summary {
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem 0;
    color: #333;
}

.faq summary:hover {
    color: #667eea;
}

.faq details[open] summary {
    color: #667eea;
    margin-bottom: 0.75rem;
}

.faq p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Blog Styles */
.breadcrumb {
    padding: 1rem 0;
    color: #666;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.blog-list {
    max-width: 800px;
    margin: 0 auto;
}

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

.blog-card h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.blog-card h2 a {
    color: #333;
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: #667eea;
}

.blog-meta {
    color: #999;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

/* Article Styles */
.blog-article {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.blog-article h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.article-meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.blog-article h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.blog-article h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.blog-article p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #444;
}

.blog-article ul, .blog-article ol {
    margin: 1rem 0;
    padding-left: 2rem;
    line-height: 1.8;
}

.blog-article li {
    margin-bottom: 0.5rem;
}

.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 3rem;
}

.cta-box h3 {
    margin-top: 0;
    color: white;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
}

.cta-button:hover {
    background: #f0f0f0;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .lang-toggle {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .controls label {
        margin-top: 0.5rem;
    }

    .controls select,
    .controls input[type="range"] {
        width: 100%;
    }

    .controls button {
        width: 100%;
        margin-top: 0.5rem;
    }

    #preview {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .format-grid {
        grid-template-columns: 1fr;
    }

    .format-item {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 2rem 0.75rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .upload-content h2 {
        font-size: 1.2rem;
    }

    .upload-content p {
        font-size: 0.85rem;
    }

    main {
        padding: 1rem 0.5rem;
    }

    .converter,
    .features,
    .formats {
        padding: 1.5rem;
    }
}
