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

/* SVG Icon Styling */
.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: inline-block;
    vertical-align: -0.125em;
}

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --success: #10b981;
    --error: #ef4444;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

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

header {
    text-align: center;
    padding: 30px 20px 25px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(2, 132, 199, 0.4);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.logo {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -1px;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #bae6fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
}

h1 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
    opacity: 0.95;
    position: relative;
}

.subtitle {
    font-size: 0.8rem;
    opacity: 0.85;
    position: relative;
}

.trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
    font-size: 0.7rem;
    opacity: 0.9;
    position: relative;
}

.badge {
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge i {
    color: #10b981;
}

.badge .icon {
    fill: #10b981;
}

.upload-area {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 18px;
}

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

.upload-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
    opacity: 0.7;
    color: var(--primary);
}

.upload-text {
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.upload-subtext {
    color: var(--text-muted);
    font-size: 0.7rem;
}

#fileInput {
    display: none;
}

.options-panel {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: none;
}

.options-panel.active {
    display: block;
}

.option-group {
    margin-bottom: 12px;
    position: relative;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text);
    font-size: 0.8rem;
}

.option-group select,
.option-group input {
    width: 100%;
    padding: 8px;
    border: 2px solid var(--border);
    border-radius: 5px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.8rem;
    transition: border-color 0.3s ease;
}

.option-group select:focus,
.option-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.option-group input[type="range"] {
    accent-color: var(--primary);
}

.convert-btn {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

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

.convert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.progress-container {
    display: none;
    margin: 30px 0;
}

.progress-container.active {
    display: block;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: var(--text-muted);
}

.result-container {
    display: none;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.result-container.active {
    display: block;
}

.result-icon {
    font-size: 2.5rem;
    color: var(--success);
    margin-bottom: 12px;
}

.result-stats {
    margin: 20px 0;
}

.result-stats p {
    margin: 8px 0;
    font-size: 0.85rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 0;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.copy-btn svg {
    width: 18px;
    height: 18px;
}

.reset-btn {
    display: inline-block;
    margin-left: 10px;
    padding: 10px 20px;
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

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

.seo-content {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 25px;
    margin-top: 40px;
    line-height: 1.8;
}

.seo-content h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.seo-content h3 {
    font-size: 1.1rem;
    margin-top: 25px;
    margin-bottom: 12px;
    color: var(--text);
}

.seo-content p {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.seo-content ul,
.seo-content ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.seo-content li {
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.seo-content li strong {
    color: var(--text);
}

footer {
    text-align: center;
    padding: 25px 15px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.8rem;
    }
    
    h1 {
        font-size: 1rem;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 8px;
    }

    .upload-area {
        padding: 20px 12px;
    }

    .seo-content {
        padding: 20px;
    }
}
