* {
    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;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

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

header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.download-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease;
}

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

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

.url-input-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

#url {
    flex: 1;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: monospace;
}

#url:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.3);
}

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

small {
    display: block;
    margin-top: 10px;
    color: #666;
    font-size: 0.85rem;
}

.loading {
    text-align: center;
    padding: 30px;
}

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

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

.result {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.video-preview {
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    padding: 15px;
}

.video-preview video {
    width: 100%;
    max-height: 400px;
    border-radius: 12px;
    background: #000;
}

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

.quality-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
}

.quality-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.quality-btn .quality {
    font-size: 1.2rem;
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.quality-btn .size {
    font-size: 0.85rem;
    color: #666;
}

.error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #c33;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.feature {
    background: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.feature:hover {
    transform: translateY(-5px);
}

.feature span {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.feature h3 {
    margin-bottom: 10px;
    color: #667eea;
}

.feature p {
    color: #666;
    font-size: 0.9rem;
}

.faq {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.faq h2 {
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.faq-item strong {
    display: block;
    margin-bottom: 8px;
    color: #667eea;
    font-size: 1rem;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
}

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

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

@media (max-width: 768px) {
    .download-card {
        padding: 25px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .url-input-wrapper {
        flex-direction: column;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    .quality-options {
        grid-template-columns: 1fr;
    }
}

/* Tutorial Section */
.tutorial-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    border: 1px solid rgba(102,126,234,0.2);
}

.tutorial-section h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.tutorial-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: white;
    padding: 12px;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.step:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-text strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
}

.step-text p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.tutorial-image {
    text-align: center;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tutorial-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.image-caption {
    margin-top: 10px;
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 500;
}

.legal-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.legal-notice h3 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.legal-notice p {
    color: #856404;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .tutorial-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tutorial-image {
        order: -1;
    }
    
    .step {
        padding: 10px;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}

 /* === RODAPÉ (fora do container, 100% largura) === */
.footer {
  background-color: transparent; /* deixa o fundo livre */
  padding: 2rem 0;
  margin-top: auto;
  width: 100%;
}

.footer-card {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px; /* arredondado */
  padding: 1rem 1.5rem;
  text-align: center;
  color: #495057;
  font-size: 0.9rem;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.footer-card a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.footer-card a:hover {
  text-decoration: underline;
}

/* Botão de ajuda compacto */
.help-trigger {
    margin-top: 10px;
    text-align: right;
}

.help-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.help-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.modal-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.modal-step .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
}

.modal-step .step-text strong {
    display: block;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.modal-step .step-text p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

.modal-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-image {
        order: -1;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* Garantir que o footer fique no final */
.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Botão de tutorial GRANDE e CENTRALIZADO */
.tutorial-button-container {
    text-align: center;
    margin: 20px 0 10px 0;
}

.tutorial-main-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.tutorial-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}

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

/* Modal (popup do tutorial) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 850px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
}

.close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.modal-steps {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.modal-step .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
}

.modal-step .step-text strong {
    display: block;
    color: #333;
    font-size: 1rem;
    margin-bottom: 4px;
}

.modal-step .step-text p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.modal-image {
    text-align: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
}

.modal-image img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.image-caption {
    margin-top: 10px;
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Footer - Sem estilos extras */
.footer {
    margin-top: 50px;
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsividade */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-image {
        order: -1;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .tutorial-main-btn {
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    .footer-content p {
        font-size: 0.8rem;
    }
}