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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 20px;
}

.language-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #4a5568;
}

.lang-btn:hover {
    border-color: #4299e1;
    color: #2b6cb0;
}

.lang-btn.active {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
}

main {
    flex: 1;
}

.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #4299e1;
    background: #ebf8ff;
}

.upload-content {
    max-width: 400px;
    margin: 0 auto;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: #4299e1;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #718096;
    margin-bottom: 20px;
}

.upload-btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.upload-btn:hover {
    background: #3182ce;
}

.supported-formats {
    margin-top: 20px;
    font-size: 14px;
    color: #718096;
}

.video-preview {
    margin-bottom: 30px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

#videoPlayer {
    width: 100%;
    max-height: 400px;
}

.settings-panel {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.settings-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #2d3748;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a5568;
}

.setting-group input[type="number"],
.setting-group select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.setting-group input[type="number"]:focus,
.setting-group select:focus {
    outline: none;
    border-color: #4299e1;
}

.setting-group input[type="range"] {
    width: calc(100% - 50px);
    margin-right: 10px;
}

#fpsValue {
    font-weight: 600;
    color: #2d3748;
}

.convert-btn {
    width: 100%;
    background: #48bb78;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.convert-btn:hover {
    background: #38a169;
}

.progress-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.progress-bar {
    background: #e2e8f0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    background: #48bb78;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 16px;
    color: #4a5568;
}

.result-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.result-container h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 20px;
}

#resultGif {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.result-info {
    margin-bottom: 25px;
}

.result-info p {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 5px;
}

.result-info span:last-child {
    font-weight: 600;
    color: #2d3748;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn,
.new-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn {
    background: #48bb78;
    color: white;
}

.download-btn:hover {
    background: #38a169;
}

.new-btn {
    background: white;
    color: #4299e1;
    border: 2px solid #4299e1;
}

.new-btn:hover {
    background: #4299e1;
    color: white;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: #718096;
    font-size: 14px;
    margin-top: 40px;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .settings-panel {
        padding: 20px;
    }
    
    .result-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .download-btn,
    .new-btn {
        width: 100%;
    }
}