/* -----------------------------------------------
    RESET & GLOBAL STYLES
----------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(145deg, #faf8f5 0%, #f0ede8 100%);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
    color: #1e1e2a;
    padding: 2rem 1.5rem;
}

/* elegant container */
.dashboard-container {
    max-width: 880px;
    margin: 0 auto;
}

/* -----------------------------------------------
    PROFILE CARD (USER HEADER)
----------------------------------------------- */
.profile-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 2.5rem;
    padding: 1.75rem 2rem;
    margin-bottom: 2.2rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #e2c6a0, #c9af8b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c241a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    background-image: radial-gradient(circle at 30% 20%, rgba(255,245,225,0.8) 2%, transparent 2.5%);
    background-size: 18px 18px;
}

.user-name h1 {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(145deg, #1f1b16, #3f3529);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 0.2rem;
}

.user-name .badge {
    font-size: 0.8rem;
    background: #eae4db;
    padding: 0.2rem 0.8rem;
    border-radius: 60px;
    color: #5f4c38;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.post-stats {
    background: #fff8f0;
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.02), 0 2px 6px rgba(0,0,0,0.02);
}

.post-stats i {
    color: #c47a44;
    margin-right: 0.3rem;
}

/* -----------------------------------------------
    CREATE POST BUTTON
----------------------------------------------- */
.create-post-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1e1b17;
    color: white;
    text-decoration: none;
    padding: 0.7rem 1.6rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255,215,175,0.3);
}

.create-post-btn i {
    font-size: 1rem;
    transition: transform 0.2s;
}

.create-post-btn:hover {
    background: #000000cc;
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.create-post-btn:active {
    transform: translateY(1px);
}

/* -----------------------------------------------
    FEED HEADER
----------------------------------------------- */
.feed-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 1.8rem 0 1.2rem 0;
}

.feed-title h3 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    background: linear-gradient(120deg, #402f20, #2b221a);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.feed-title span i {
    color: #c47a44;
    font-size: 0.9rem;
}

/* -----------------------------------------------
    POSTS GRID
----------------------------------------------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2rem;
}

/* -----------------------------------------------
    POST CARD
----------------------------------------------- */
.post-card {
    background: #ffffff;
    border-radius: 1.75rem;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 32px -16px rgba(0, 0, 0, 0.15);
}

.image-wrapper {
    position: relative;
    background: #f3efe8;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-img {
    transform: scale(1.02);
}

/* -----------------------------------------------
    POST ACTIONS - BOTONES CORREGIDOS
----------------------------------------------- */
.post-actions {
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: #fefcf9;
    border-top: 1px solid #f0eae2;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Formulario del botón eliminar */
.delete-form {
    margin: 0;
    display: inline-flex;
}

/* Botón eliminar - TAMAÑO CORREGIDO */
.btn-delete {
    background: rgba(188, 154, 108, 0.12);
    border: none;
    cursor: pointer;
    color: #bc9a6c;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.9rem;
}

.btn-delete i {
    font-size: 0.9rem;
}

.btn-delete:hover {
    background: #fbe4d4;
    color: #e74c3c;
    transform: scale(0.95);
}

/* Botón editar */
.btn-edit {
    text-decoration: none;
    background: rgba(220, 200, 170, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b4e2e;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0.5px solid #e4d5c4;
}

.btn-edit i {
    font-size: 0.7rem;
}

.btn-edit:hover {
    background: #e9dbce;
    color: #3e2c1c;
    border-color: #ccb79a;
    transform: translateY(-1px);
}

/* Etiqueta de propietario / vista previa */
.owner-tag {
    font-size: 0.65rem;
    background: #f2ebe2;
    padding: 0.2rem 0.7rem;
    border-radius: 60px;
    color: #8f6f4a;
    font-weight: 500;
    letter-spacing: -0.2px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.owner-tag i {
    font-size: 0.6rem;
}

/* -----------------------------------------------
    EMPTY FEED STATE
----------------------------------------------- */
.empty-feed {
    text-align: center;
    background: #ffffffc7;
    backdrop-filter: blur(4px);
    padding: 3rem 1.5rem;
    border-radius: 2.5rem;
    margin-top: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.02);
    border: 1px dashed #dfcfbd;
}

.empty-feed i {
    font-size: 3.2rem;
    color: #cdb598;
    margin-bottom: 0.8rem;
}

.empty-feed p {
    color: #7a674f;
    font-weight: 500;
}

.empty-feed a {
    display: inline-block;
    margin-top: 18px;
    background: #e2d4c4;
    padding: 8px 18px;
    border-radius: 60px;
    text-decoration: none;
    color: #3b2d1f;
    font-weight: 500;
    transition: all 0.2s;
}

.empty-feed a:hover {
    background: #d4c2ae;
    transform: scale(1.02);
}

/* -----------------------------------------------
    FOOTER
----------------------------------------------- */
footer {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.75rem;
    color: #b7a07e;
    border-top: 1px solid #e7ddd2;
    padding-top: 1.8rem;
}

/* -----------------------------------------------
    RESPONSIVE
----------------------------------------------- */
@media (max-width: 640px) {
    body {
        padding: 1.2rem;
    }
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .create-post-btn {
        align-self: flex-start;
        margin-top: 0.5rem;
    }
    .posts-grid {
        gap: 1.2rem;
    }
    .post-actions {
        padding: 0.7rem;
    }
    .btn-delete {
        width: 28px;
        height: 28px;
    }
    .btn-edit {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }
}
/* ====== CONTENEDOR DE EDICIÓN ====== */
.edit-container {
    max-width: 600px;
    margin: auto;
}

/* ====== BOTÓN VOLVER ====== */
.btn-back {
    display: inline-block;
    background: #6b7280;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    transition: background .2s ease;
}

.btn-back:hover {
    background: #4b5563;
}

/* ====== FORMULARIO ====== */
form {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

img {
    display: block;
    margin: 10px auto 20px auto;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    background: #fafafa;
    border: 2px dashed #ccc;
    border-radius: 10px;
    cursor: pointer;
    transition: border .2s ease;
}

input[type="file"]:hover {
    border-color: #0077ff;
}

/* BOTÓN ELIMINAR — AJUSTE DE TAMAÑO */
.btn-delete {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 50%;
    background: rgba(188, 154, 108, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete i {
    font-size: 0.75rem; /* Ícono más pequeño */
    line-height: 1;
}

.btn-delete:hover {
    background: #fbe4d4;
    color: #e74c3c;
    transform: scale(0.92);
}

.btn-logout {
    background-color: #ef4444;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-logout:hover {
    background-color: #dc2626;
}



