* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 94%;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

main {
    display: grid;
    gap: 20px;
}

.form-section,
.status-section,
.inspect-section,
.log-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-section h2,
.status-section h2,
.inspect-section h2,
.log-section h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.log-header h2 {
    margin-bottom: 0;
}

.clear-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clear-btn:hover {
    background: #c53030;
}

.clear-btn:active {
    transform: translateY(1px);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

input[type="url"],
input[type="text"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="url"]:focus,
input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.download-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#status-container {
    text-align: center;
}

#status-message {
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 20px;
}

#progress-container {
    margin-top: 20px;
}

#progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    font-weight: 600;
    color: #4a5568;
}

#log-container {
    height: 300px;
    overflow-y: auto;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
}

#log-content {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: #2d3748;
}

.hidden {
    display: none;
}

.status-success {
    color: #38a169 !important;
}

.status-error {
    color: #e53e3e !important;
}

.status-warning {
    color: #d69e2e !important;
}

.log-entry {
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 4px;
}

.log-entry.success {
    background: #f0fff4;
    color: #38a169;
}

.log-entry.error {
    background: #fed7d7;
    color: #e53e3e;
}

.log-entry.warning {
    background: #fefcbf;
    color: #d69e2e;
}

.log-entry.info {
    background: #ebf8ff;
    color: #3182ce;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.left-column {
    display: grid;
    grid-template-rows: auto 1fr; /* form arriba, status abajo */
    gap: 20px;
}

.right-column {
    display: grid;
    grid-template-rows: auto 1fr; /* status arriba, log ocupando el resto */
    gap: 20px;
}

/* Inspection section */
.inspect-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-height: 100px;
}
#inspect-container {
    height: 300px;
    overflow-y: auto;
}
#inspect-details ul {
    list-style: none;
    padding-left: 0;
}

#inspect-message {
    color: #4a5568;
    font-size: 14px;
}


#inspect-details li {
    margin-bottom: 5px;
    font-size: 14px;
    color: #2d3748;
}


/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .form-section,
    .status-section,
    .log-section {
        padding: 20px;
    }

    .dashboard {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .right-column {
        grid-template-rows: auto auto;
        gap: 20px;
    }
}

/* Estilos para iconos de estado de canciones */
.track-icon {
    display: inline-block;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.track-state-waiting {
    opacity: 0.6;
}

.track-state-downloading {
    background-color: rgba(255, 193, 7, 0.2);
    animation: pulse 1.5s ease-in-out infinite alternate;
}

.track-state-completed {
    background-color: rgba(40, 167, 69, 0.2);
}

.track-state-error {
    background-color: rgba(220, 53, 69, 0.2);
}

@keyframes pulse {
    from {
        background-color: rgba(255, 193, 7, 0.1);
    }
    to {
        background-color: rgba(255, 193, 7, 0.3);
    }
}

.track-info {
    vertical-align: middle;
}

/* Footer Styles */
.main-footer {
    margin-top: 40px;
    padding: 20px 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-top: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 94%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: white;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-version {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.version-label {
    font-weight: 600;
    color: #fff;
}

.version-number {
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-links a:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: translateY(-1px);
}

.separator {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
}

.footer-badge {
    display: flex;
    align-items: center;
}

.open-source-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-info {
        align-items: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}
