.profile-view {
    max-width: 900px;
    width: 92%;
    margin: 24px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-header, .library-section, .library-card-container {
    background: var(--custom-burbujas, #ffffff);
    color: var(--custom-burbujas-texto, #111111);
    padding: 20px 24px;
    border-radius: 18px;
    border: 1px solid var(--custom-burbujas-borde, #e0e0e0);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 22px;
}

.profile-avatar-wrapper {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #e8e8e8;
    border: 2px solid #cccccc;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.profile-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-username {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--custom-burbujas-texto, #111111);
    line-height: 1.15;
}

.profile-stats {
    display: flex;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--custom-burbujas-texto-secundario, #444444);
    font-family: Arial, sans-serif;
}

.profile-stats strong {
    font-family: Arial, sans-serif;
    font-weight: 700;
    color: var(--custom-burbujas-texto, #111111);
}

.profile-bio {
    font-size: 0.92rem;
    color: var(--custom-burbujas-texto-secundario, #555555);
    font-style: italic;
    line-height: 1.3;
}

.library-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--custom-burbujas-borde, #e0e0e0);
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 12px;
}

.library-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--custom-burbujas-texto, #111111);
}

.library-header #btn-alternar-borradores {
    height: 34px;
    padding: 5px 14px;
    font-size: 0.92rem;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 24px;
    padding-top: 8px;
}

.library-book-card {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.library-book-card:hover {
    transform: translateY(-6px);
}

.mini-notebook-cover {
    width: 120px;
    height: 165px;
    border-radius: 4px 10px 10px 4px;
    position: relative;
    box-shadow: -4px 0 8px rgba(0,0,0,0.15), 6px 10px 20px rgba(0,0,0,0.22);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.mini-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 14px;
    background: rgba(0,0,0,0.4);
    border-right: 1px solid rgba(255,255,255,0.15);
    z-index: 5;
}

.mini-composition-label {
    background: #ffffff;
    padding: 3px 5px;
    border: 1px solid #111111;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5px;
    z-index: 10;
    width: 68px;
    border-radius: 1.5px;
}

.mini-comp-header-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 0.35rem;
    color: #111111;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-comp-line {
    width: 100%;
    height: 0.8px;
    background: #111111;
}

.mini-cover-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.31rem;
    font-style: italic;
    color: #444444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-stickers-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    pointer-events: none;
    overflow: hidden;
}

.mini-stickers-layer .sticker-item {
    position: absolute;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    box-sizing: border-box;
}

.mini-stickers-layer .sticker-item img {
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    display: block;
}

.mini-stickers-layer .sticker-actions,
.mini-stickers-layer .rotate-handle,
.mini-stickers-layer .resize-handle {
    display: none !important;
}

@media (max-width: 768px) {
    .profile-view {
        margin: 16px auto;
        gap: 14px;
    }

    .profile-header, .library-section, .library-card-container {
        padding: 14px 16px;
        border-radius: 16px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .profile-avatar-wrapper {
        width: 66px;
        height: 66px;
    }

    .profile-info {
        gap: 4px;
    }

    .profile-row-top {
        justify-content: center;
        gap: 6px;
    }

    .profile-username {
        font-size: 1.18rem;
    }

    .profile-stats {
        justify-content: center;
        gap: 10px;
        font-size: 0.78rem;
    }

    .profile-bio {
        font-size: 0.85rem;
        line-height: 1.25;
    }
}