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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

header {
    background-color: #0066cc;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

h1, h2, h3 {
    margin-bottom: 1rem;
}

/* Sidebar */
.sidebar {
    flex: 1;
    background-color: #fff;
    padding: 1rem;
    margin-right: 1rem;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.video-item {
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    background-color: #f9f9f9;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.video-item:hover {
    background-color: #f0f0f0;
}

.video-name {
    font-weight: bold;
    margin-bottom: 0.3rem;
    word-break: break-all;
}

.video-info {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.btn-select-video {
    background-color: #0066cc;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-select-video:hover {
    background-color: #0055aa;
}

/* Contenido principal */
.content {
    flex: 3;
    background-color: #fff;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#video-info {
    margin-bottom: 1rem;
    font-weight: bold;
}

.video-player-container {
    width: 100%;
    margin-bottom: 1rem;
}

#video-player {
    width: 100%;
    max-height: 400px;
    background-color: #000;
}

.controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.controls button {
    background-color: #0066cc;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
}

.controls button:hover {
    background-color: #0055aa;
}

/* Editor de clip */
.clip-editor {
    margin-top: 2rem;
}

.time-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.time-control {
    flex: 1;
    margin-right: 1rem;
}

.time-control:last-child {
    margin-right: 0;
}

.time-control label {
    display: block;
    margin-bottom: 0.5rem;
}

.time-control input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.time-control button {
    background-color: #0066cc;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
}

.time-control button:hover {
    background-color: #0055aa;
}

.clip-actions {
    display: flex;
    justify-content: space-between;
}

.clip-actions button {
    flex: 1;
    margin-right: 1rem;
    background-color: #0066cc;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
}

.clip-actions button:last-child {
    margin-right: 0;
}

.clip-actions button:hover {
    background-color: #0055aa;
}

/* Mensajes de error */
.error {
    color: #cc0000;
    font-weight: bold;
}

/* Panel de depuración */
.debug-panel {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 1rem;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.debug-panel h3 {
    color: #0066cc;
}

#debug-info {
    margin-bottom: 1rem;
}

#debug-output {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    border-radius: 3px;
    overflow-x: auto;
    white-space: pre-wrap;
    margin-top: 1rem;
}

#btn-test-api, #btn-check-dir, #btn-test-video {
    background-color: #0066cc;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 0.5rem;
}

#btn-test-api:hover, #btn-check-dir:hover, #btn-test-video:hover {
    background-color: #0055aa;
}

/* Estilos para la barra de búsqueda */
.search-container {
    margin-bottom: 1rem;
}

.search-input-container {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

#search-input {
    flex: 1;
    padding: 0.5rem;
    border: none;
    outline: none;
}

.btn-search {
    background-color: #0066cc;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.btn-search:hover {
    background-color: #0055aa;
}

/* Estilos para la paginación */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.pagination button {
    background-color: #0066cc;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
}

.pagination button:hover:not(:disabled) {
    background-color: #0055aa;
}

.pagination button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .time-controls {
        flex-direction: column;
    }
    
    .time-control {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Estilos para miniaturas de video */
.video-thumbnail {
    width: 100%;
    height: 100px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border-radius: 3px;
    background-color: #000;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
