/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos del cuerpo */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 20px;
}

/* Contenedor principal */
.container {
    width: 100%;
    max-width: 1200px;
}

/* Layout principal */
.main-content {
    display: flex;
    gap: 24px;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .main-content {
        flex-direction: row;
    }
}

/* Contenedor del video */
.video-container {
    flex: 1;
    position: relative;
}

/* Estilos del video */
video {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Controles personalizados del video */
.video-controls {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.3s ease;
    font-size: 18px;
}

.control-btn:hover {
    color: #ff4444;
}

.time-display {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* Sidebar */
.sidebar {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tarjeta de perfil */
.profile-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-img-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff4444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-info h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-info p {
    color: #cccccc;
    font-size: 14px;
}

.profile-actions {
    display: flex;
    gap: 16px;
}

.action-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.action-btn:hover {
    color: #ff4444;
}

.action-btn.liked {
    color: #ff4444;
}

/* Lista de perfiles */
.profiles-list {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profiles-list h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.profiles-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 256px;
    overflow-y: auto;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.profile-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.profile-img-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #666;
}

.profile-item-info {
    flex: 1;
}

.profile-item-info p {
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.profile-item-info small {
    color: #aaa;
    font-size: 12px;
}

/* Mensaje de carga */
.loading {
    display: none;
    color: #ffffff;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.loading.show {
    display: flex;
}

/* Spinner de carga */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensaje de fallback */
.fallback-message {
    display: none;
    color: #ff6b6b;
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.fallback-message.show {
    display: block;
}

.fallback-message p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.5;
}

/* Botón de fallback */
.fallback-button {
    display: inline-block;
    color: #ffffff;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.fallback-button:hover {
    background: linear-gradient(135deg, #ff5252, #ff4444);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.fallback-button:active {
    transform: translateY(0);
}

/* Responsive design */
@media (max-width: 1024px) {
    .sidebar {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-content {
        gap: 16px;
    }
    
    .video-controls {
        bottom: 8px;
        left: 8px;
        right: 8px;
        padding: 12px;
    }
    
    .profile-card {
        padding: 16px;
    }
    
    .profile-img-large {
        width: 48px;
        height: 48px;
    }
    
    .fallback-message {
        margin: 10px;
        padding: 15px;
    }
    
    .fallback-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    video {
        border-radius: 8px;
    }
    
    .profile-header {
        gap: 12px;
    }
    
    .controls-left {
        gap: 12px;
    }
    
    .control-btn {
        padding: 6px;
        font-size: 16px;
    }
    
    .time-display {
        font-size: 12px;
    }
}

/* Animaciones suaves */
video, .loading, .fallback-message, .profile-card, .profiles-list {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar personalizado */
.profiles-grid::-webkit-scrollbar {
    width: 4px;
}

.profiles-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.profiles-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.profiles-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}