/* assets/css/style.css */
:root {
    --fb-blue: #1877f2;
    --fb-dark: #1b1f2b;
    --fb-gray: #f0f2f5;
}

body {
    background-color: var(--fb-gray);
    padding-top: 0px;
}

/* Avatar */
.avatar-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.avatar-circle-sm {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-text {
    color: white;
    font-size: 32px;
    font-weight: bold;
}

.avatar-text-sm {
    color: white;
    font-size: 16px;
    font-weight: bold;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.drop-zone:hover {
    border-color: var(--fb-blue);
    background: #f0f7ff;
}

.drop-zone.dragover {
    border-color: var(--fb-blue);
    background: #e7f3ff;
}

/* Feed Posts */
.feed-post {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.feed-post:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.feed-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.card-img-wrapper {
    position: relative;
    background: #000;
}

/* Comments */
.comments-section {
    max-height: 150px;
    overflow-y: auto;
    padding: 10px 0;
}

.comment-item {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.comment-item strong {
    color: var(--fb-blue);
    margin-right: 5px;
}

.comment-item small {
    font-size: 11px;
    margin-left: 8px;
}

/* File preview */
.file-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-item .remove-file {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .drop-zone {
        padding: 20px 10px;
    }
    
    .feed-img {
        max-height: 300px;
    }
    
    .comment-form {
        flex-wrap: wrap;
    }
    
    .comment-form input {
        flex: 1;
        min-width: 120px;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feed-post {
    animation: fadeInUp 0.5s ease;
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Badge y etiquetas */
.badge-primary {
    background-color: var(--fb-blue);
}

.btn-primary {
    background-color: var(--fb-blue);
    border-color: var(--fb-blue);
}

.btn-primary:hover {
    background-color: #1666d1;
    border-color: #1666d1;
}

/* Dropdown en posts */
.dropdown-toggle::after {
    display: none;
}

/* Loading spinner para subida */
.uploading {
    pointer-events: none;
    opacity: 0.6;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--fb-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Estilos para la cámara - Agregar en el <style> del head */
#videoContainer {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 10px auto;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

#videoContainer video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

#videoContainer .btn-capture {
    background: #ffd700;
    color: #1a1a2e;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

#videoContainer .btn-capture:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.4);
}

#videoContainer .btn-capture:active {
    transform: scale(0.95);
}

#videoContainer .btn-rotate-camera {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 6px;
}

#videoContainer .btn-rotate-camera:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

#videoContainer .btn-rotate-camera:active {
    transform: scale(0.95);
}

#videoContainer .btn-close-camera {
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

#videoContainer .btn-close-camera:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.05);
}

#videoContainer .btn-close-camera:active {
    transform: scale(0.95);
}

/* Animación de pulso para el indicador de cámara */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Indicador de cámara activa */
.camera-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
}

.camera-indicator .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* Controles de la cámara en móvil */
@media (max-width: 480px) {
    #videoContainer {
        max-width: 100%;
        border-radius: 10px;
    }
    
    #videoContainer .btn-capture {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    #videoContainer .btn-rotate-camera,
    #videoContainer .btn-close-camera {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    #videoContainer .camera-indicator {
        font-size: 9px;
        padding: 3px 8px;
    }
    
    #videoContainer .camera-indicator .dot {
        width: 6px;
        height: 6px;
    }

    /* Estilos para previews de captura de cámara */
.camera-preview {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.camera-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-preview .remove-file {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.camera-preview .remove-file:hover {
    transform: scale(1.1);
}

.file-preview-item {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.2);
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-item .remove-file {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.file-preview-item .remove-file:hover {
    transform: scale(1.1);
}
}