/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores principais */
    --primary-color: #E1306C;
    --primary-dark: #C13584;
    --secondary-color: #405DE6;
    --accent-color: #5851DB;
    --success-color: #28a745;
    --error-color: #dc3545;
    
    /* Cores neutras */
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --text-primary: #262626;
    --text-secondary: #8e8e8e;
    --border-color: #dbdbdb;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    
    /* Espaçamentos */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* Header */
.header {
    text-align: center;
    padding: var(--spacing-xl) 0;
    color: white;
    position: relative;
}

.back-button {
    position: absolute;
    top: var(--spacing-md);
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: white;
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
    box-shadow: var(--shadow-sm);
}

.back-button i {
    font-size: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.logo i {
    font-size: 3rem;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-lg);
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.input-wrapper input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 3.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
}

.btn-download {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

/* Loading Progress Bar */
.loading-spinner {
    padding: var(--spacing-xl) 0;
    animation: fadeIn 0.3s ease;
}

.progress-container {
    max-width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        var(--primary-color) 0%, 
        var(--primary-dark) 50%, 
        var(--secondary-color) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(225, 48, 108, 0.5);
}

.loading-text {
    text-align: center;
    margin-top: var(--spacing-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

#progressPercent {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
}

/* Messages */
.message {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    animation: slideDown 0.3s ease;
}

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

.error-message {
    background-color: #fee;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.success-message {
    background-color: #efe;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.message i {
    font-size: 1.5rem;
}

.hidden {
    display: none !important;
}

/* Download Button Container */
.download-button-container {
    display: flex;
    justify-content: center;
    margin: var(--spacing-lg) 0;
    animation: fadeIn 0.5s ease;
}

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

.caption {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-direct-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    background: linear-gradient(135deg, var(--success-color) 0%, #218838 100%);
    color: white;
    text-decoration: none;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    min-width: 200px;
}

.btn-direct-download:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.btn-direct-download:active {
    transform: translateY(-1px);
}

.btn-direct-download i {
    font-size: 1.2rem;
}

/* Instructions */
.instructions {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--border-color);
}

.instructions h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.step {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-content h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-size: 1.1rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Features */
.features {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--border-color);
}

.features h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-size: 1.1rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--spacing-lg);
    color: white;
}

.footer p {
    margin-bottom: var(--spacing-xs);
}

.disclaimer {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .back-button {
        position: static;
        margin-bottom: var(--spacing-md);
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .main-content {
        padding: var(--spacing-md);
    }
    
    .input-section {
        gap: var(--spacing-sm);
    }
    
    .btn-download {
        padding: var(--spacing-md);
        font-size: 1rem;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: var(--spacing-sm);
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .play-overlay {
        font-size: 3rem;
    }
}

/* Animações suaves */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}
