:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --primary-hover: linear-gradient(135deg, #2563eb, #7c3aed);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
}

.app-container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.converter-box {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.converter-box.dragover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.upload-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-ui svg {
    color: #3b82f6;
    margin-bottom: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.formats-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}

.preview-ui {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.image-comparison {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.img-box {
    flex: 1;
    min-width: 250px;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.img-box img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    object-fit: contain;
}

.file-size {
    background: var(--primary-gradient);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

#webpSize {
    background: linear-gradient(135deg, #10b981, #059669);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.slider-group {
    width: 100%;
    max-width: 400px;
}

input[type=range] {
    width: 100%;
    accent-color: #3b82f6;
    margin-top: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.ad-slot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.top-ad {
    height: 90px;
    width: 100%;
    max-width: 728px;
    margin: 0 auto;
}

.bottom-ad {
    height: 250px;
    width: 100%;
}

footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #3b82f6;
}

.app-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

@media (max-width: 600px) {
    .image-comparison {
        flex-direction: column;
    }
}
