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

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

section h2 {
    color: #667eea;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7em;
    font-weight: normal;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-danger:hover {
    background: #c82333;
}

.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.list-container {
    min-height: 100px;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.conversion-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.conversion-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.conversion-info {
    flex: 1;
}

.conversion-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    word-break: break-word;
}

.conversion-meta {
    font-size: 0.9em;
    color: #666;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.conversion-url {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
}

.conversion-url:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #ffc107;
    color: #856404;
}

.status-processing {
    background: #17a2b8;
    color: white;
    animation: pulse 2s infinite;
}

.status-completed {
    background: #28a745;
    color: white;
}

.status-error {
    background: #dc3545;
    color: white;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.conversion-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 8px;
    font-style: italic;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .conversion-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .conversion-actions {
        width: 100%;
        margin-top: 15px;
    }

    .conversion-actions button {
        flex: 1;
    }
}

/* Search Styles */
.search-input-group {
    display: flex;
    gap: 10px;
}

.search-input-group input {
    flex: 1;
}

.search-results {
    margin-top: 20px;
}

.search-result-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.result-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.result-info strong {
    font-size: 1.05em;
    color: #333;
}

.result-info .duration {
    font-size: 0.85em;
    color: #666;
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    align-self: flex-start;
}

.loading {
    text-align: center;
    color: #666;
    padding: 20px;
}

@media (max-width: 768px) {
    .search-input-group {
        flex-direction: column;
    }

    .search-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .search-result-item button {
        width: 100%;
    }
}

/* Player Styles */
.player-container {
    margin-right: 10px;
}

.audio-player {
    height: 40px;
    max-width: 250px;
}

@media (max-width: 768px) {
    .player-container {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .audio-player {
        width: 100%;
        max-width: none;
    }
}

/* Global Player Styles */
.global-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    padding: 15px 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.player-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.track-info {
    width: 200px;
    flex-shrink: 0;
}

.track-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.track-time {
    font-size: 0.8em;
    color: #666;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-control {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-control:hover {
    background: #f0f0f0;
}

.player-progress {
    flex: 1;
    display: flex;
    align-items: center;
}

.progress-bar {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
}

.volume-bar {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 150px;
}

.volume-bar {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
}

.volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
}

.btn-close-player {
    background: none;
    border: none;
    font-size: 1.2em;
    color: #999;
    cursor: pointer;
    padding: 5px;
}

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

@media (max-width: 768px) {
    .player-content {
        flex-wrap: wrap;
        gap: 10px;
    }

    .track-info {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }

    .player-controls {
        width: 100%;
        margin-bottom: 5px;
    }

    .player-volume {
        display: none;
        /* Ocultar volumen en móvil para ahorrar espacio */
    }

    .btn-close-player {
        position: absolute;
        top: 5px;
        right: 5px;
    }
}

/* Main Navigation Styles */
.main-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 20px;
}

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

.nav-brand h1 {
    font-size: 1.5em;
    margin: 0;
    color: #667eea;
}

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

.nav-link {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    transition: all 0.3s;
    background: transparent;
}

.nav-link:hover {
    background: #f0f0f0;
    color: #667eea;
}

.nav-link.active {
    background: #667eea;
    color: white;
}

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

.btn-login {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-login:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #667eea;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.btn-logout {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

/* Ajustar header de página */
.page-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.page-header h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .nav-brand h1 {
        font-size: 1.2em;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .nav-link {
        flex: 1;
        text-align: center;
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .user-name {
        display: none;
    }
}

/* Footer Styles */
.app-footer {
    margin-top: 50px;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    color: #555;
}

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

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
}

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

@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}