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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 900px;
    width: 100%;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 10px;
}

.tech-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.url-input {
    flex: 1;
    padding: 18px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.url-input:focus {
    outline: none;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-btn {
    padding: 18px 32px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 150px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

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

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

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

.error-message {
    background: #ff4757;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

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

.video-info {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-preview {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.thumbnail {
    width: 280px;
    height: 157px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.video-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.video-title {
    font-size: 1.5rem;
    color: #2d3436;
    line-height: 1.4;
}

.video-duration {
    color: #636e72;
    font-size: 1rem;
}

.video-uploader {
    color: #636e72;
    font-size: 0.95rem;
}

.formats-container h3 {
    color: #2d3436;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.formats-list {
    display: grid;
    gap: 12px;
}

.format-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.format-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.format-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quality-badge {
    padding: 8px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 70px;
    text-align: center;
}

.quality-badge.ultra {
    background: linear-gradient(135deg, #FA8BFF 0%, #2BD2FF 50%, #2BFF88 100%);
    box-shadow: 0 4px 15px rgba(250, 139, 255, 0.4);
    animation: pulse 2s infinite;
}

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

.quality-badge.uhd {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
}

.quality-badge.hd {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.format-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.format-name {
    font-weight: 600;
    color: #2d3436;
}

.format-size {
    font-size: 0.9rem;
    color: #636e72;
}

.download-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .search-container {
        flex-direction: column;
    }

    .video-preview {
        flex-direction: column;
    }

    .thumbnail {
        width: 100%;
        height: auto;
    }

    .format-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
