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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.logo {
    font-size: 2.5em;
    font-weight: bold;
    color: #ff0000;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.input-group {
    margin-bottom: 25px;
}

.input-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.search-input:focus {
    border-color: #ff0000;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.download-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(45deg, #ff0000, #cc0000);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.3);
}

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

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.results-container {
    margin-top: 30px;
    text-align: center;
}

.thumbnail-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.thumbnail-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-info {
    text-align: left;
    margin-bottom: 20px;
}

.video-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.video-details {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.thumbnail-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.thumbnail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.thumbnail-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.thumbnail-quality {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.thumbnail-resolution {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.download-thumb-btn {
    background: #ff0000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.download-thumb-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

.download-thumb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: none;
    color: #ff0000;
    font-weight: 600;
    margin: 20px 0;
}

.error {
    color: #dc3545;
    background: #f8d7da;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}

.success {
    color: #155724;
    background: #d4edda;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}

.footer {
    margin-top: 40px;
    text-align: center;
}

.footer-links {
    margin-bottom: 15px;
}

.whatsapp-btn {
    display: inline-block;
    background: #25d366;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.whatsapp-btn:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.powered-by {
    color: #666;
    font-size: 0.9em;
    font-weight: 600;
}

@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .logo {
        font-size: 2em;
    }
    
    .thumbnails-grid {
        grid-template-columns: 1fr;
    }
}

.quality-badge {
    display: inline-block;
    background: #ff0000;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 5px;
}

/* PWA INSTALL POPUP STYLES */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.popup-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 18px;
    color: #888;
    cursor: pointer;
}

.pwa-popup-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin: 0 auto 15px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pwa-popup-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.pwa-popup-desc {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 20px;
}

.pwa-install-btn {
    background: linear-gradient(45deg, #ff0000, #cc0000);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.pwa-install-btn:hover {
    box-shadow: 0 6px 15px rgba(255, 0, 0, 0.4);
    transform: translateY(-1px);
}

.not-now-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 16px;
}
