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

body {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        #0f0f1a;
}

.header {
    text-align: center;
    padding: 2rem 1rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.title-gradient {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.arrow {
    color: #6b7280;
}

.subtitle {
    color: #6b7280;
    font-size: 1.1rem;
    font-weight: 400;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.drop-zone {
    width: 100%;
    max-width: 500px;
    min-height: 320px;
    border: 3px dashed #3f3f5a;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(30, 30, 50, 0.5);
    backdrop-filter: blur(10px);
    padding: 2rem;
}

.drop-zone:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    transform: scale(1.01);
}

.drop-zone.dragging {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.15);
    border-style: solid;
    animation: pulse-border 1s ease infinite;
    box-shadow: 0 0 40px rgba(236, 72, 153, 0.3);
}

.drop-zone.loading {
    cursor: wait;
    opacity: 0.7;
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 20px rgba(236, 72, 153, 0.3); }
    50% { box-shadow: 0 0 40px rgba(236, 72, 153, 0.5); }
}

.hidden-input {
    display: none;
}

.drop-icon {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 3rem;
}

.arrow-icon {
    font-size: 2rem;
    color: #8b5cf6;
    animation: arrow-bounce 2s ease infinite;
}

@keyframes arrow-bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

.drop-text {
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
    text-align: center;
}

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

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid #3f3f5a;
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 1rem;
}

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

.converter-panel {
    width: 100%;
    max-width: 800px;
    background: rgba(30, 30, 50, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.preview-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .preview-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .converter-panel {
        padding: 2rem;
    }
}

.preview-card {
    background: rgba(20, 20, 35, 0.8);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-card h3 {
    font-size: 0.85rem;
    color: #8b5cf6;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.video-preview,
.gif-preview {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 12px;
    background: #000;
}

.file-info {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

.file-info p:first-child {
    color: #e0e0e0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.options-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
    .options-section {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
        justify-content: center;
    }
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pill-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pill {
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid #3f3f5a;
    background: transparent;
    color: #9ca3af;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pill:hover {
    border-color: #8b5cf6;
    color: #e0e0e0;
}

.pill.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border-color: transparent;
    color: white;
    font-weight: 500;
}

.progress-section {
    text-align: center;
    padding: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #2a2a3e;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 100px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.loading-message {
    color: #9ca3af;
    font-size: 0.95rem;
}

.bounce-berry {
    display: inline-block;
    animation: bounce 0.6s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.convert-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    min-height: 48px;
    width: 100%;
    max-width: 280px;
}

.convert-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.5);
}

.convert-btn:active {
    transform: scale(0.98);
}

.download-btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    min-height: 48px;
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.5);
}

.download-btn:active {
    transform: scale(0.98);
}

.reset-btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid #3f3f5a;
    border-radius: 100px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 48px;
}

.reset-btn:hover {
    border-color: #8b5cf6;
    color: #e0e0e0;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
    width: 100%;
    max-width: 500px;
}

.error-message p {
    color: #fca5a5;
    margin-bottom: 1rem;
}

.error-message button {
    padding: 0.5rem 1.5rem;
    border: 1px solid #ef4444;
    border-radius: 100px;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    min-height: 44px;
}

.error-message button:hover {
    background: rgba(239, 68, 68, 0.2);
}

.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #4b5563;
    font-size: 0.85rem;
}

.footer a {
    color: #8b5cf6;
    text-decoration: none;
    margin-left: 1rem;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 0.5rem;
}

.footer a:hover {
    color: #ec4899;
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .drop-zone {
        min-height: 260px;
        padding: 1.5rem;
    }
    
    .drop-icon {
        font-size: 2.5rem;
        gap: 0.75rem;
    }
    
    .converter-panel {
        padding: 1rem;
    }
    
    .pill {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn,
    .reset-btn {
        width: 100%;
        max-width: 280px;
    }
}