:root {
    --bg-primary: #1e1f22;
    --bg-secondary: #2b2d31;
    --bg-tertiary: #313338;
    --bg-card: #232428;
    --text-primary: #f2f3f5;
    --text-secondary: #b5bac1;
    --text-muted: #80848e;
    --accent-primary: #5865f2;
    --accent-hover: #4752c4;
    --success: #23a559;
    --danger: #f23f43;
    --warning: #f0b232;
    --border-color: rgba(255, 255, 255, 0.06);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: var(--text-primary);
    overflow-x: hidden;
}

.main-wrapper {
    padding: 2rem 1rem;
}

/* Profile Card */
.profile-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-banner {
    height: 550px;
    background-image: url('./ShinobuBanner.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;

    
}



.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(35, 36, 40, 0.4) 100%);
}

/* Avatar */
.profile-header {
    padding: 0 2rem;
    position: relative;
    margin-top: -60px;
}

.avatar-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.avatar-wrapper {
    position: relative;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid var(--bg-secondary);
    display: block;
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.status-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 4px solid var(--bg-secondary);
    position: absolute;
    bottom: 4px;
    right: 4px;
}

.status-online {
    background: var(--success);
    box-shadow: 0 0 12px var(--success);
}

/* Badges */
.profile-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.badge-item {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.badge-item:hover {
    background: var(--accent-primary);
    transform: translateY(-2px);
}

/* Profile Body */
.profile-body {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
    padding: 2rem;
}

@media (max-width: 992px) {
    .profile-body {
        grid-template-columns: 1fr;
    }
}

.profile-section {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.profile-username {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.username-tag {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 400;
}

.profile-pronouns {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.profile-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.profile-bio {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Activity */
.activity-section {
    margin-top: 1.5rem;
}

.activity-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
    transition: transform 0.2s ease;
}

.activity-card:hover {
    transform: translateX(4px);
}

.activity-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-primary);
}

.activity-details {
    flex: 1;
}

.activity-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.activity-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Member Info */
.member-info {
    margin-top: 1.5rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.info-row i {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Note Section */
.note-section {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.note-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.note-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.note-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Roles */
.roles-section {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
}

.roles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform 0.2s ease;
    cursor: default;
}

.role-tag:hover {
    transform: scale(1.05);
}

.role-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Sidebar */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-links,
.projects-section {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-primary);
    transform: translateX(4px);
}

.social-link i:first-child {
    font-size: 1.25rem;
}

.social-link span {
    flex: 1;
    font-weight: 500;
}

.social-link i:last-child {
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover i:last-child {
    opacity: 1;
}

/* Projects */
.project-card {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.project-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header {
        padding: 0 1rem;
    }
    
    .profile-body {
        padding: 1rem;
    }
    
    .avatar {
        width: 80px;
        height: 80px;
    }
    
    .profile-username {
        font-size: 1.5rem;
    }
}

/* ============================================
   SECCIÓN DE BLOG
   ============================================ */

.blog-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.blog-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.blog-title i {
    color: var(--accent-primary);
}

.btn-new-post {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-new-post:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

/* Formulario de Post */
.post-form {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid var(--accent-primary);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.btn-close-form {
    background: var(--bg-tertiary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-form:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.form-control-custom {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-control-custom::placeholder {
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-cancel,
.btn-publish {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-cancel:hover {
    background: var(--bg-secondary);
}

.btn-publish {
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-publish:hover {
    background: #1e8e4e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 165, 89, 0.4);
}

/* Contenedor de Posts */
.posts-container {
    display: grid;
    gap: 1.5rem;
}

.blog-post {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-primary);
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.blog-post:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.post-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-title-group h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.post-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-desarrollo {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.category-gaming {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.category-aprendizaje {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.category-proyectos {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.category-personal {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

.post-content {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-edit,
.btn-delete {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-edit {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-edit:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-delete {
    background: var(--bg-tertiary);
    color: var(--danger);
}

.btn-delete:hover {
    background: var(--danger);
    color: white;
}

/* Mensaje de blog vacío */
.empty-blog {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-blog i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-blog p {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-subtitle {
    font-size: 0.95rem !important;
    opacity: 0.7;
}

/* Responsive Blog */
@media (max-width: 768px) {
    .blog-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .btn-new-post {
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-publish {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   AUTENTICACIÓN
   ============================================ */

.auth-panel {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.auth-container {
    max-width: 400px;
    margin: 0 auto;
}

.auth-container h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.auth-container p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-login {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.btn-login:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.auth-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted) !important;
}

.btn-logout {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* ============================================
   UPLOAD DE IMÁGENES
   ============================================ */

.image-upload-section {
    margin-bottom: 1rem;
}

.image-upload-label {
    display: inline-block;
    background: var(--bg-tertiary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-weight: 500;
}

.image-upload-label:hover {
    background: var(--accent-primary);
    color: white;
}


.btn-remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.btn-remove-image:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(242, 63, 67, 0.4);
}



/* Vista pública del blog */
.public-blog .posts-container {
    pointer-events: none;
}

.public-blog .post-actions {
    display: none;
}

@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-new-post,
    .btn-logout {
        width: 100%;
        justify-content: center;
    }
}

/* Estilos adicionales para admin */
.btn-view-public {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-view-public:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-back {
    display: inline-block;
    margin-top: 1rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.btn-back:hover {
    color: var(--accent-primary);
}

.download-instructions {
    background: rgba(88, 101, 242, 0.1);
    border: 2px dashed var(--accent-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.download-instructions p {
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-download {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download:hover {
    background: #1e8e4e;
    transform: translateY(-2px);
}

.post-image-container {
    width: 100%;
    max-width: 800px; /* ← LÍMITE DE ANCHO */
    margin: 1rem auto; /* centrado */
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-image {
    width: 100%;
    height: auto;
    max-height: 500px; /* ← LÍMITE DE ALTURA */
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.post-image:hover {
    transform: scale(1.02);
}

/* Preview en el formulario */
.image-preview {
    margin-top: 1rem;
    position: relative;
    width: 100%;
    max-width: 600px; /* ← LÍMITE PARA PREVIEW */
    margin-left: auto;
    margin-right: auto;
    max-height: 400px;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: auto;
    max-height: 400px; /* ← LÍMITE PARA PREVIEW */
    object-fit: contain;
    background: transparent;
    border-radius: 8px;
}


