body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
}

.mode-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

.mode-toggle button {
    background-color: #ff9500;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.mode-toggle button:hover {
    background-color: #e08900;
}

.search-bar, .filters, .sort-button {
    width: 100%;
    max-width: 600px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
}

.search-bar input, .sort-button button, .filters select, .filters input, .search-bar button {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    background-color: #e0e0e0;
    outline: none;
    transition: background-color 0.3s;
}

.search-bar input:focus, .sort-button button:focus, .filters select:focus, .filters input:focus, .search-bar button:focus {
    background-color: #d0d0d0;
}

.search-bar button {
    background-color: #ff9500;
    color: white;
    margin-top: 10px;
}

.search-bar button:hover {
    background-color: #e08900;
}

.filters label {
    margin-bottom: 5px;
    font-weight: bold;
}

.filters select, .filters input {
    background-color: #ffffff;
    border: 1px solid #ccc;
}

.videos-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.video-card {
    width: 300px;
    margin: 10px;
    background-color: white;
    border-radius: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.video-card img {
    width: 100%;
    height: 168px;
    object-fit: cover;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
}

.video-card .info {
    padding: 10px;
}

.video-card .title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 16px;
}

.video-card .channel {
    color: #777;
    font-size: 14px;
}

.video-card .stats {
    font-size: 12px;
    color: #999;
}

.video-card .similar-button {
    margin-top: 10px;
    background-color: #ff9500;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.video-card .similar-button:hover {
    background-color: #e08900;
}

body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

body.dark-mode .search-bar input, body.dark-mode .sort-button button, body.dark-mode .filters select, body.dark-mode .filters input, body.dark-mode .search-bar button {
    background-color: #333;
    color: #ffffff;
}

body.dark-mode .video-card {
    background-color: #1e1e1e;
}

body.dark-mode .video-card .channel {
    color: #999;
}

body.dark-mode .video-card .stats {
    color: #bbb;
}

body.dark-mode .mode-toggle button {
    background-color: #ff9500;
    color: white;
}

body.dark-mode .mode-toggle button:hover {
    background-color: #e08900;
}

/* Botón de regreso tipo iPhone */
.back-button {
    position: absolute;
    bottom: 20px; /* Ajusta la distancia desde la parte inferior del contenedor */
    left: 20px; /* Ajusta la distancia desde la parte izquierda del contenedor */
    width: 80px; /* Tamaño del botón */
    height: 80px; /* Tamaño del botón */
    background-color: #007AFF; /* Color de fondo tipo iPhone */
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 30px; /* Tamaño del texto o icono */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10; /* Asegura que el botón esté por encima de otros elementos */
    transition: background-color 0.3s;
}

/* Ajuste en tamaño y posición del botón para pantallas pequeñas */
@media (max-width: 768px) {
    .back-button {
        width: 60px; /* Reduce el tamaño del botón en pantallas pequeñas */
        height: 60px;
        font-size: 24px; /* Reduce el tamaño del texto o icono */
        bottom: 30px; /* Ajusta la distancia desde la parte inferior */
        left: 15px; /* Ajusta la distancia desde la parte izquierda */
    }
}

@media (max-width: 480px) {
    .back-button {
        width: 50px; /* Reduce aún más el tamaño del botón */
        height: 50px;
        font-size: 20px; /* Reduce aún más el tamaño del texto o icono */
        bottom: 30px; /* Ajusta la distancia desde la parte inferior */
        left: 10px; /* Ajusta la distancia desde la parte izquierda */
    }
}

.back-button:hover {
    background-color: #005BB5; /* Color de fondo en hover */
}

.back-button span {
    font-size: inherit; /* Usa el tamaño de fuente heredado para texto o icono */
}