* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

main {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 3rem;
}

.input-section {
    margin-bottom: 2rem;
}

.url-input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

#videoUrl {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

#videoUrl:focus {
    outline: none;
    border-color: #ff0050;
    box-shadow: 0 0 0 3px rgba(255, 0, 80, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #ff0050 0%, #ff6b6b 100%);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 0, 80, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.help-text {
    color: #666;
    font-size: 0.85rem;
}

.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff0050;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result {
    animation: fadeIn 0.5s ease;
}

.video-preview {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
}

#previewVideo {
    width: 100%;
    max-height: 500px;
    background: #000;
}

.video-info {
    padding: 1.5rem;
}

#videoTitle {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    word-break: break-word;
}

.download-options {
    display: flex;
    gap: 1rem;
}

.btn-download {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-family: inherit;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.error {
    background: #fee;
    border-left: 4px solid #ff0050;
    padding: 1rem;
    border-radius: 8px;
    color: #c33;
    margin-top: 1rem;
    transition: opacity 0.5s;
}

.features {
    text-align: center;
}

.features h2 {
    color: white;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    color: white;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    opacity: 0.9;
    font-size: 0.9rem;
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .url-input-container {
        flex-direction: column;
    }
    
    .download-options {
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}