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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Language Selector */
.language-selector {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
}

.lang-btn {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Free Banner */
.free-banner {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.free-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.free-banner p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #f3e8ff 100%);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

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

.converter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Type Selector */
.type-selector {
    text-align: center;
}

.type-selector h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

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

.type-btn {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1rem;
}

.type-btn:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.type-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-lg);
}

.type-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.type-name {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.type-desc {
    font-size: 0.85rem;
    opacity: 0.7;
}

.type-btn.active .type-desc {
    opacity: 0.9;
}

/* Converter Box */
.converter-box {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.free-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Dynamic Icon */
.converter-icon {
    text-align: center;
    margin-bottom: 2rem;
}

.rotating-icon {
    width: 80px;
    height: 80px;
    color: var(--primary-color);
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(99, 102, 241, 0.02);
}

.upload-area:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary-dark);
}

.upload-area.dragover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-dark);
    transform: scale(1.02);
}

.upload-icon {
    width: 60px;
    height: 60px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.upload-hint {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* File Preview */
.file-preview {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.file-icon {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
}

.file-details {
    text-align: left;
}

.file-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-light);
}

.remove-file-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.remove-file-btn:hover {
    color: var(--danger-color);
}

.remove-file-btn svg {
    width: 20px;
    height: 20px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    width: 60px;
    height: 60px;
    color: var(--success-color);
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-message h3 {
    font-size: 1.5rem;
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.success-message p {
    color: var(--text-light);
}

/* Buttons */
.convert-btn,
.download-btn {
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.convert-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
}

.convert-btn:active {
    transform: translateY(0);
}

.download-btn {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.4);
}

.convert-btn svg,
.download-btn svg {
    width: 20px;
    height: 20px;
}

/* Trust Section */
.trust-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #f3e8ff 100%);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
}

.trust-section h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

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

.trust-item {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.trust-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.trust-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.trust-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.trust-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--bg-white);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

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

.feature-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .converter-box {
        padding: 1.5rem;
    }

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

    .upload-area {
        padding: 2rem;
    }

    .upload-icon {
        width: 40px;
        height: 40px;
    }

    .rotating-icon {
        width: 60px;
        height: 60px;
    }

    .trust-section {
        padding: 2rem;
    }

    .nav {
        gap: 1rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }

    .language-selector {
        margin-left: 0;
        border-left: none;
        padding-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

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

    .convert-btn,
    .download-btn {
        padding: 1rem;
        font-size: 1rem;
    }

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

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

    .free-banner {
        padding: 1rem;
    }

    .free-banner p {
        font-size: 0.95rem;
    }
}
