:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-light: #6b7280;
    --background: #f8fafc;
    --card: #ffffff;
    --error: #ef4444;
    --success: #10b981;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    right: 10%;
    animation-delay: -5s;
    animation-duration: 25s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 20%;
    right: -75px;
    animation-delay: -10s;
    animation-duration: 30s;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.card {
    background: var(--card);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 520px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

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

.magic-wand {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    animation: pulse 2s infinite;
}

.magic-wand i {
    font-size: 32px;
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

h1 {
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.tagline {
    color: var(--text-light);
    font-size: 16px;
    font-weight: 400;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

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

.converter-form {
    margin-bottom: 32px;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 24px;
    background: #f8fafc;
}

.upload-area:hover {
    border-color: var(--primary);
    background: #f0f4ff;
}

.upload-area.dragover {
    border-color: var(--primary);
    background: #e0e7ff;
    transform: scale(1.02);
}

.upload-area i {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.upload-area:hover i {
    color: var(--primary);
}

.upload-area h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.upload-area p {
    color: var(--text-light);
    font-size: 14px;
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-info {
    margin-top: 16px;
    padding: 12px;
    background: #e0e7ff;
    border-radius: 8px;
    font-size: 14px;
    color: var(--primary-dark);
    display: none;
}

.format-selector {
    margin-bottom: 24px;
}

.format-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text);
}

.format-selector label i {
    color: var(--primary);
}

.format-dropdown {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    background: var(--card);
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%236b7280' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
}

.format-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.convert-btn {
    width: 100%;
    padding: 18px 24px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

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

.convert-btn.loading {
    pointer-events: none;
}

.btn-loader {
    display: none;
}

.convert-btn.loading .btn-text {
    display: none;
}

.convert-btn.loading .btn-loader {
    display: block;
}

.btn-icon {
    font-size: 18px;
}

.security-note {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.security-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.security-header i {
    color: var(--success);
    font-size: 20px;
}

.security-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.security-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.feature i {
    color: var(--success);
    font-size: 14px;
}

.disclaimer {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-light);
    text-align: center;
}

.footer {
    text-align: center;
}

.limits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.limits i {
    color: var(--accent);
}

.credits {
    font-size: 14px;
    color: var(--text-light);
}

.credits i {
    color: #ef4444;
    margin: 0 4px;
}

@media (max-width: 640px) {
    .container {
        padding: 16px;
    }
    
    .card {
        padding: 24px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .security-features {
        grid-template-columns: 1fr;
    }
    
    .upload-area {
        padding: 30px 16px;
    }
}