* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container-fluid {
    width: 100%;
    padding: 20px;
}

header {
    margin-bottom: 30px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left {
    text-align: left;
    flex: 1;
}

.header-right {
    text-align: right;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.btn-outline-danger {
    background: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

.controls {
    margin-bottom: 20px;
    text-align: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,193,7,0.3);
}

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover {
    background: #f8f9fa;
}

.video-title {
    font-weight: 600;
    color: #007bff;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-captions {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6c757d;
}

.clickable-captions, .clickable-title, .clickable-description {
    cursor: pointer;
    color: #007bff;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.clickable-captions:hover, .clickable-title:hover, .clickable-description:hover {
    color: #0056b3;
}

.channel-cell {
    font-weight: 600;
    color: #495057;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Anchos específicos para columnas - página de content */
th:nth-child(1), td:nth-child(1) { width: 90px !important; } /* ID */
th:nth-child(2), td:nth-child(2) { width: 100px; } /* Estado */
th:nth-child(3), td:nth-child(3) { width: 100px; } /* Video Copiado */
th:nth-child(4), td:nth-child(4) { width: 180px; } /* Título */
th:nth-child(5), td:nth-child(5) { width: 180px; } /* Descripción */
th:nth-child(6), td:nth-child(6) { width: 120px; } /* Subtítulos */
th:nth-child(7), td:nth-child(7) { width: 100px; } /* Canal */
th:nth-child(8), td:nth-child(8) { width: 80px; } /* Miniatura */
th:nth-child(9), td:nth-child(9) { width: 120px; } /* Fecha Programado */
th:nth-child(10), td:nth-child(10) { width: 120px; } /* Fecha Subida */
th:nth-child(11), td:nth-child(11) { width: 140px; } /* Acciones */

.thumbnail-preview {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.launch-date {
    font-size: 0.9rem;
    color: #6c757d;
}

.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 8px 12px;
    font-size: 12px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-group input[type="file"] {
    padding: 8px;
    border: 2px dashed #e9ecef;
    background-color: #f8f9fa;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Loading spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 1200px) {
    .container-fluid {
        padding: 15px;
    }
    
    .table-container {
        overflow-x: auto;
        margin: 0 -15px;
    }
    
    table {
        width: 100%;
        font-size: 12px;
    }
    
    th, td {
        padding: 10px 8px;
    }
    
    .video-title, .video-description, .video-captions, .channel-cell {
        max-width: 150px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    
    .action-buttons .btn {
        padding: 6px 8px;
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-left {
        text-align: center;
    }
    
    .header-right {
        text-align: center;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .table-container {
        overflow-x: auto;
        margin: 0 -10px;
    }
    
    table {
        width: 100%;
        font-size: 11px;
    }
    
    th, td {
        padding: 8px 6px;
    }
    
    .video-title, .video-description, .video-captions, .channel-cell {
        max-width: 120px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 2px;
    }
    
    .action-buttons .btn {
        padding: 5px 6px;
        font-size: 9px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
}

/* Status indicators */
.status-pending {
    color: #ffc107;
    font-weight: 600;
}

.status-scheduled {
    color: #17a2b8;
    font-weight: 600;
}

.status-finished {
    color: #28a745;
    font-weight: 600;
}

.status-youtube-upload-fail {
    color: #dc3545;
    font-weight: 600;
}

.video-description {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6c757d;
}

.video-url a {
    color: #007bff;
    text-decoration: none;
}

.video-url a:hover {
    text-decoration: underline;
}

.scheduled-date, .upload-date {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Notificaciones elegantes */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-content i {
    font-size: 18px;
}

.notification-success .notification-content i {
    color: #28a745;
}

.notification-error .notification-content i {
    color: #dc3545;
}

.notification-content span {
    font-weight: 500;
    color: #333;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: #666;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Success/Error messages (mantener para compatibilidad) */
.message {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 600;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Estilos para paginación */
.pagination-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pagination-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-info-main span {
    font-weight: 600;
    color: #666;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-info {
    font-weight: 600;
    color: #666;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.no-more-data {
    color: #999;
    font-style: italic;
}

.pagination-info .btn {
    margin: 0;
    padding: 8px 16px;
    font-size: 13px;
}

.pagination-info .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .pagination-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .pagination-controls {
        justify-content: center;
    }
}

/* Estilos específicos para la página de canales */
/* Ancho específico para la primera columna en la tabla de canales */
#channelsTable th:nth-child(1), 
#channelsTable td:nth-child(1) { 
    width: 20% !important; 
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-info i {
    font-size: 1.2rem;
}

.username {
    font-family: 'Courier New', monospace;
    color: #666;
    font-weight: 500;
}

.views, .subscribers {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 2px;
}

.last-update {
    font-size: 0.9rem;
    color: #6c757d;
}

.channel-name {
    font-weight: 500;
}

/* Estilos para responsive - ocultar elementos en mobile */
.mobile-metrics {
    display: none;
    margin-top: 8px;
    gap: 15px;
}

.mobile-user-info {
    display: none;
    margin-top: 8px;
    font-size: 0.75rem;
}

.mobile-username, .mobile-update {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: #666;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.user-label, .update-label {
    color: #999;
    font-weight: 500;
}

.user-value, .update-value {
    color: #555;
    font-weight: 600;
}

/* Media query para tablets y móviles */
@media (max-width: 1000px) {
    /* Ocultar columnas de desktop */
    .desktop-only {
        display: none !important;
    }
    
    /* Mostrar elementos mobile */
    .mobile-metrics {
        display: flex;
        justify-content: space-around;
        background-color: #f8f9fa;
        padding: 10px;
        border-radius: 6px;
        margin-top: 10px;
    }
    
    .mobile-user-info {
        display: block;
        background-color: #f1f3f4;
        padding: 8px;
        border-radius: 4px;
        margin-top: 8px;
    }
    
    /* Ajustar tabla para 1 columna en mobile */
    #channelsTable thead th:nth-child(2),
    #channelsTable thead th:nth-child(3),
    #channelsTable thead th:nth-child(4),
    #channelsTable thead th:nth-child(5) {
        display: none;
    }
    
    /* Una sola columna que ocupe todo el ancho */
    .mobile-full-info {
        width: 100% !important;
    }
    
    /* Estilos específicos para mobile - letra más pequeña */
    .channel-info span {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .metric-item .metric-value {
        font-size: 0.85rem;
        font-weight: bold;
        color: #2c3e50;
    }
    
    .metric-item .metric-label {
        font-size: 0.65rem;
        color: #7f8c8d;
    }
    
    .mobile-username, .mobile-update {
        font-size: 0.7rem;
    }
    
    .user-label, .update-label {
        font-size: 0.7rem;
    }
    
    .user-value, .update-value {
        font-size: 0.7rem;
    }
    
    /* Reducir padding en mobile */
    .channel-row td {
        padding: 10px 12px;
        vertical-align: top;
    }
    
    /* Ajustar header de tabla en mobile */
    #channelsTable thead th:first-child {
        text-align: center;
        font-size: 0.85rem;
    }
}

/* Estilos para badges de tipo de video */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    color: #fff;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-success {
    background-color: #28a745;
}

.video-type-cell {
    text-align: center;
    vertical-align: middle;
} 