/* RESET Y CONFIGURACIÓN BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* NAVEGACIÓN */
.nav-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.nav-header.nav-hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    text-decoration: none;
    transition: transform 0.3s;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 1.05em;
}

.nav-links a:first-child {
    background: rgba(255,255,255,0.2);
}

.nav-links a:last-child {
    background: white;
    color: #667eea;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.nav-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* SECCIÓN DE DESCARGA */
.downloader {
    padding: 60px 20px;
    margin-top: 70px; /* Espacio para el navbar fijo */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 30px;
    padding: 50px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.download-title {
    text-align: center;
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 15px;
}

.download-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.2em;
    margin-bottom: 40px;
}

.input-container {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.url-input {
    flex: 1;
    padding: 20px;
    font-size: 1.1em;
    border: 3px solid #667eea;
    border-radius: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.url-input:focus {
    border-color: #764ba2;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.download-btn {
    padding: 20px 40px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.download-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* LOADING Y PREVIEW */
.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.loading.active {
    display: block;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    display: none;
    background: #ff7675;
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.1em;
    margin-top: 20px;
    animation: shake 0.5s ease;
}

.error-message.active {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.video-preview {
    display: none;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    animation: slideUp 0.5s ease;
}

.video-preview.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-info {
    display: flex;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.video-thumbnail {
    width: 150px;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.video-details {
    flex: 1;
}

.video-details h3 {
    color: #d63031;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.video-details p {
    color: #666;
    margin-bottom: 8px;
    font-size: 1em;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.download-option-btn {
    padding: 15px 25px;
    font-size: 1em;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.3);
}

.download-option-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(245, 87, 108, 0.5);
}

.download-option-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* SECCIÓN DE INTRODUCCIÓN */
.intro-section {
    padding: 80px 20px;
    background: white;
}

.intro-content {
    max-width: 1000px;
    margin: 0 auto;
}

.intro-content h2 {
    color: #667eea;
    font-size: 2.2em;
    margin-bottom: 25px;
    text-align: center;
}

.intro-content p {
    font-size: 1.15em;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;
}

.intro-content strong {
    color: #667eea;
}

/* CARACTERÍSTICAS */
.features {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 35px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.feature-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.feature-card h3 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.feature-card p {
    font-size: 1.05em;
    line-height: 1.7;
    color: #666;
}

/* CÓMO FUNCIONA */
.how-it-works {
    padding: 80px 20px;
    background: white;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.step {
    position: relative;
}

.step-number {
    font-size: 4em;
    font-weight: bold;
    color: rgba(102, 126, 234, 0.2);
    position: absolute;
    top: -20px;
    left: 20px;
}

.step-content {
    position: relative;
    z-index: 1;
}

.step-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    min-height: 200px;
}

.step-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.step-box h3 {
    color: #667eea;
    font-size: 1.6em;
    margin-bottom: 15px;
    margin-top: 30px;
}

.step-box p {
    color: #666;
    line-height: 1.7;
    font-size: 1.05em;
}

/* GUÍA DETALLADA */
.detailed-guide {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.guide-content {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.guide-content h3 {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 30px;
    margin-top: 40px;
}

.guide-content h3:first-child {
    margin-top: 0;
}

.guide-content p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.guide-content ul, .guide-content ol {
    margin: 20px 0 30px 30px;
}

.guide-content li {
    font-size: 1.05em;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.guide-content strong {
    color: #667eea;
}

.highlight-box {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    border-left: 5px solid #f5576c;
}

.highlight-box p {
    margin: 0;
    font-weight: 500;
    color: #333;
}

/* PREGUNTAS FRECUENTES */
.faq-section {
    padding: 80px 20px;
    background: white;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 30px;
    background: white;
}

.faq-answer.active {
    max-height: 1000px;
    padding: 25px 30px;
}

.faq-answer p {
    color: #666;
    line-height: 1.8;
    font-size: 1.05em;
}

/* FOOTER */
footer {
    background: #2d3436;
    color: white;
    text-align: center;
    padding: 50px 20px;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

footer p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.footer-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.footer-links span {
    color: rgba(255, 255, 255, 0.5);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-header {
        padding: 0;
    }

    .nav-container {
        flex-direction: row;
        gap: 8px;
        padding: 8px 15px;
        justify-content: space-between;
    }
    
    .nav-logo {
        font-size: 1.1em;
    }

    .nav-links {
        gap: 6px;
    }

    .nav-links a {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .downloader {
        margin-top: 55px;
    }

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

    .container {
        padding: 30px 20px;
    }

    .download-title {
        font-size: 2em;
    }

    .download-subtitle {
        font-size: 1em;
    }

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

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

    .intro-content h2 {
        font-size: 1.8em;
    }

    .intro-content p {
        font-size: 1.05em;
        text-align: left;
    }

    .section-title {
        font-size: 2em;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .guide-content {
        padding: 30px 20px;
    }

    .guide-content h3 {
        font-size: 1.6em;
    }

    .guide-content p {
        font-size: 1em;
    }

    .faq-question {
        font-size: 1em;
        padding: 20px;
    }

    .faq-answer {
        padding: 0 20px;
    }

    .faq-answer.active {
        padding: 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .download-title {
        font-size: 1.6em;
    }

    .url-input {
        padding: 15px;
        font-size: 0.95em;
    }

    .download-btn {
        padding: 15px 25px;
        font-size: 1em;
    }

    .feature-icon {
        font-size: 2.5em;
    }

    .step-number {
        font-size: 3em;
    }
}