:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --background-color: #f8f9fa;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body { 
    background: var(--background-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.main-container { 
    max-width: 1200px; 
    margin: 15px auto; 
    padding: 15px;
    animation: fadeIn 0.5s ease-in;
}

.search-container { 
    background: #fff; 
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.site-title { 
    font-size: clamp(2em, 5vw, 3em);
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.site-slogan { 
    font-size: clamp(1em, 3vw, 1.3em);
    color: #666;
    margin-bottom: 25px;
}

.card { 
    margin-bottom: 15px; 
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-container {
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.card-img-top { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    right: 5px;
    bottom: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 5px;
    font-size: 12px;
    border-radius: 3px;
}

.card-text { 
    font-size: 10px; 
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.youtube-icon {
    color: #FF0000;
    font-size: 12px;
    margin-right: 4px;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #357abd;
    transform: translateY(-1px);
}

.download-btn { 
    margin: 4px;
    min-width: 110px;
    font-size: 0.9rem;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Progress Bar Styles */
.progress {
    height: 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-bar {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    transition: width 0.5s ease-in-out;
    position: relative;
    overflow: visible;
}

.progress-bar.bg-info {
    background-color: #17a2b8;
    color: white;
}

.progress-bar.bg-success {
    background-color: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

#downloadInfo {
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 4px;
    background-color: rgba(0,0,0,0.05);
    margin-top: 10px;
}

#downloadInfo i {
    margin-right: 5px;
}

.progress-bar-striped {
    background-image: linear-gradient(
        45deg,
        rgba(255,255,255,0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

.download-status {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.status-text {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.speed-text {
    display: block;
    font-size: 0.8rem;
    color: #888;
}

/* Alert Styles */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-info {
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

@media (max-width: 768px) {
    .main-container {
        margin: 10px;
        padding: 10px;
    }
    
    .search-container {
        padding: 15px;
    }

    .download-btn {
        min-width: 45%;
        font-size: 0.85rem;
    }

    .progress {
        height: 16px;
    }

    .progress-bar {
        font-size: 10px;
        line-height: 16px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes progress-bar-stripes {
    from { background-position: 1rem 0; }
    to { background-position: 0 0; }
}

.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazy-load.loaded {
    opacity: 1;
}


/* Estilos de botones de compartir */
.share-buttons .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.share-buttons .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    filter: brightness(0.10);
}

.btn-facebook { background-color: #3b5998; }
.btn-twitter { background-color: #1da1f2; }
.btn-whatsapp { background-color: #25d366; }
.btn-telegram { background-color: #0088cc; }

/* Estilos adicionales de la barra de progreso */
.progress-bar {
    white-space: normal;
    line-height: 1.2;
}

.progress-bar.two-lines {
    height: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#downloadInfo {
    font-size: 0.9rem;
    margin-top: 5px;
}

#downloadInfo i {
    color: #6c757d;
}

.progress {
    height: 20px;
}