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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e1e2e;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

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

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

.card {
    background: #2a2a3e;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

#youtubeUrl {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #1e1e2e;
    color: #fff;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#youtubeUrl::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#youtubeUrl:focus {
    outline: none;
    border-color: #11998e;
    background: #252538;
    box-shadow: 0 0 0 3px rgba(17, 153, 142, 0.2);
}

.download-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px dashed rgba(255, 255, 255, 0.1);
    animation: slideIn 0.3s ease-out;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.download-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-btn-primary {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.download-btn-primary:hover {
    transform: translateY(-2px);
}

.download-btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.download-btn-secondary:hover {
    transform: translateY(-2px);
}

.download-btn:hover {
    transform: translateY(-2px);
}

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

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

.status {
    padding: 15px;
    border-radius: 10px;
    margin-top: 50px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.status.success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.status.info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.hidden {
    display: none !important;
}

.video-info {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 0;
    animation: slideIn 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#thumbnail {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.info-text {
    flex: 1;
}

.info-text h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #fff;
}

.info-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.progress-container {
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

.loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #11998e;
    border-right: 5px solid #38ef7d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loader-text {
    color: #38ef7d;
    font-weight: 600;
    font-size: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.progress-text {
    text-align: center;
    color: #38ef7d;
    font-size: 0.9rem;
}

.success-notification {
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    animation: bounceIn 0.5s ease-out;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: scaleUp 0.5s ease-out;
}

.success-notification h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.success-notification p {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 20px;
}

.new-search-btn {
    background: white;
    color: #11998e;
    border: 2px solid white;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.new-search-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.instructions {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    animation: fadeIn 0.6s ease-out 0.3s both;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.instructions h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.instructions ol {
    margin-left: 20px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.instructions li {
    margin-bottom: 8px;
}

.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    animation: fadeIn 0.6s ease-out 0.4s both;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    font-size: 0.9rem;
}

/* Animações */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

    .card {
        padding: 25px;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .video-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #thumbnail {
        width: 100%;
        max-width: 320px;
        height: auto;
    }
}

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

    .header p {
        font-size: 0.9rem;
    }

    .card {
        padding: 20px;
    }

    .download-btn {
        font-size: 1rem;
        padding: 12px 20px;
    }

    .instructions {
        padding: 20px;
    }
}
