/* ============================================
   BOOK.CSS - Premium Redesign
   Responsivo e proporcional (max 6.9")
============================================ */

/* IMPORTS & VARS FROM SETTINGS */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap');

:root {
    --gold-light: #fef08a;
    --gold-dark: #a16207;
    --wood-depth: #2a1a0c;
}

/* Container (Mesmo padrão do Shop) */
.book-box {
    /* BACKGROUND IMAGE FUNDO1 */
    background-image: url('../../../assets/images/home/fundo1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fdf6e3;

    width: calc(100% - var(--space-lg) * 2);
    max-width: calc(var(--max-app-width) - var(--space-xl) * 2);
    height: 80dvh;
    max-height: 80dvh;

    border: 4px solid var(--wood-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);

    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- CABEÇALHO --- */
.book-header {
    border-bottom: none;
    flex-shrink: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

/* Barra de madeira com título centralizado */
.book-barra-header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;

    /* HEADER BACKGROUND BARRA REMOVED */
    background-color: transparent;

    border-bottom: none;
    flex-shrink: 0;
    min-height: 110px;
    padding: var(--space-md, 16px);
}

.book-barra-header .modal-title {
    margin: 0;
    font-family: 'Luckiest Guy', cursive;
    /* Updated Font */
    font-weight: 400;
    font-size: clamp(20px, 6vw, 24px);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: #ffffff;
    text-shadow:
        0 2px 0 #5d4037,
        0 4px 4px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 1));
    text-align: center;
}

.book-barra-header .nav-arrow {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.8));
}

.book-barra-header .close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s;
}

.book-barra-header .close-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.book-barra-header .close-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background: radial-gradient(circle, rgba(255, 0, 0, 0.5) 0%, transparent 70%);
}

.book-barra-header .close-btn:active {
    transform: translateY(-50%) scale(0.95);
    background: radial-gradient(circle, rgba(255, 0, 0, 0.7) 0%, transparent 70%);
}

/* Botão Voltar (Estilo Nav) */
.nav-arrow {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: clamp(32px, 8vw, 36px);
    height: clamp(32px, 8vw, 36px);
    border-radius: 50%;
    font-weight: 700;
    cursor: pointer;
    color: #4B5563;
    font-size: clamp(1rem, 3vw, 1.2rem);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.nav-arrow:hover {
    background: #E5E7EB;
    color: #1F2937;
    transform: translateX(-2px);
}

.hidden {
    display: none !important;
}

/* Progresso (Abaixo da Barra) */
.book-progress-container {
    background: linear-gradient(135deg, #00C9A7, #00A389);
    padding: clamp(10px, 2.5vw, 14px) clamp(14px, 3.5vw, 18px);
    margin: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 16px);
    border-radius: clamp(10px, 3vw, 16px);
    box-shadow: 0 4px 12px rgba(0, 201, 167, 0.25);
    color: white;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    font-weight: 700;
    margin-bottom: 6px;
    opacity: 0.95;
}

.progress-track {
    height: clamp(8px, 2vw, 10px);
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 5px;
}

/* --- ÁREA DE CONTEÚDO --- */
.book-scroll-area {
    padding: clamp(12px, 3vw, 20px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Grid de Categorias (Estilo Shop Items) */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(8px, 2vw, 12px);
}

/* Header de Ciclos */
.cycle-header {
    grid-column: 1 / -1;
    margin-top: clamp(8px, 2vw, 12px);
    margin-bottom: clamp(4px, 1vw, 6px);
    font-size: clamp(0.7rem, 2.2vw, 0.85rem);
    /* Standard Text Stroke */
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow:
        1.5px 0 0 #000, -1.5px 0 0 #000, 0 1.5px 0 #000, 0 -1.5px 0 #000,
        1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

.cycle-header .cycle-progress-label {
    font-size: clamp(0.55rem, 1.8vw, 0.7rem);
    font-weight: 600;
    opacity: 0.85;
    margin-left: auto;
    text-transform: none;
}

.cycle-header::after {
    content: '';
    flex: 0 0 8px;
    height: 1px;
    background: #E5E7EB;
}

.cat-card {
    /* Settings Background Standard */
    background: rgba(255, 255, 255, 0.7);
    border-radius: clamp(10px, 2.5vw, 14px);
    padding: clamp(8px, 2vw, 12px);
    border: 1px solid rgba(139, 69, 19, 0.1);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-left-width: 3px;
    /* Destaque de cor */
}

.cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.cat-card:active {
    transform: scale(0.98);
}

.cat-card.locked {
    background: rgba(255, 255, 255, 0.7);
    border-color: #E5E7EB;
    border-left-color: #9CA3AF !important;
    opacity: 0.8;
    filter: grayscale(80%);
}

.cat-card.complete {
    background: linear-gradient(to bottom right, #FFFFFF, #F0FDFA);
    border-color: #A7F3D0;
}

.cat-icon {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: clamp(4px, 1.5vw, 8px);
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.cat-info {
    width: 100%;
}

.cat-name {
    font-weight: 800;
    /* Standard Text Stroke */
    color: #ffffff;
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    margin-bottom: clamp(4px, 1.5vw, 6px);
    display: block;
    line-height: 1.2;
    text-shadow:
        1.5px 0 0 #000, -1.5px 0 0 #000, 0 1.5px 0 #000, 0 -1.5px 0 #000,
        1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

.cat-progress {
    width: 100%;
}

.cat-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2px;
}

.cat-progress-fill {
    height: 100%;
    border-radius: 2px;
}

.cat-percent {
    font-size: clamp(0.55rem, 2vw, 0.7rem);
    /* Standard Text Stroke */
    color: #ffffff;
    font-weight: 800;
    display: block;
    text-align: right;
    text-shadow:
        1.5px 0 0 #000, -1.5px 0 0 #000, 0 1.5px 0 #000, 0 -1.5px 0 #000,
        1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

.cat-complete-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #00C9A7;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 201, 167, 0.3);
}

/* --- GRID DE PALAVRAS --- */
.word-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(8px, 2vw, 12px);
}

.word-counter {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 15px;
    border-radius: 20px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.85rem;
    color: #6B7280;
    font-weight: 600;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.book-scroll-area .word-item {
    /* Settings Background Standard */
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(139, 69, 19, 0.1);
    border-radius: clamp(8px, 2vw, 12px);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(5px, 1.5vw, 8px);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.book-scroll-area .word-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.08);
    border-color: #00C9A7;
}

.book-scroll-area .word-item.unknown {
    background: rgba(255, 255, 255, 0.7);
    border-color: #E5E7EB;
    color: #D1D5DB;
    box-shadow: none;
}

.book-scroll-area .word-item.unknown:hover {
    transform: none;
    border-color: #E5E7EB;
}

.book-scroll-area .word-item.rara {
    background: linear-gradient(135deg, #FFF, #FFFBEB);
    border-color: #FCD34D;
}

.book-scroll-area .word-item.incomum {
    background: linear-gradient(135deg, #FFF, #EFF6FF);
    border-color: #BFDBFE;
}

.w-icon {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    margin-bottom: clamp(4px, 1vw, 6px);
}

.w-text {
    font-size: clamp(0.65rem, 2.5vw, 0.75rem);
    font-weight: 800;
    line-height: 1.2;
    word-break: break-word;
    /* Standard Text Stroke */
    color: #ffffff;
    text-shadow:
        1.5px 0 0 #000, -1.5px 0 0 #000, 0 1.5px 0 #000, 0 -1.5px 0 #000,
        1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

.w-rarity {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
    color: #6B7280;
    font-weight: bold;
    text-transform: uppercase;
}

.rara .w-rarity {
    background: #FDE68A;
    color: #92400E;
}

.incomum .w-rarity {
    background: #DBEAFE;
    color: #1E40AF;
}

/* --- MODAL DE DETALHE --- */
/* Mesma estrutura do Shop Purchase Overlay */
.detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeIn 0.2s ease;
}

.detail-card {
    background: rgba(255, 255, 255, 0.7);
    width: 85%;
    max-width: calc(var(--max-app-width, 414px) * 0.85);
    border-radius: clamp(16px, 4vw, 24px);
    padding: clamp(20px, 5vw, 24px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85%;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.close-detail {
    position: absolute;
    top: clamp(12px, 3vw, 16px);
    right: clamp(12px, 3vw, 16px);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: clamp(28px, 7vw, 32px);
    height: clamp(28px, 7vw, 32px);
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    color: #6B7280;
    transition: all 0.2s;
}

.close-detail:hover {
    background: #E5E7EB;
    color: #374151;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 16px);
    margin-bottom: clamp(16px, 4vw, 20px);
    padding-bottom: clamp(12px, 3vw, 16px);
    border-bottom: 1px solid #F3F4F6;
}

.detail-icon {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    background: #F0FDFA;
    padding: clamp(10px, 2.5vw, 15px);
    border-radius: 20px;
    border: 2px solid #CCFBF1;
    box-shadow: 0 4px 10px rgba(204, 251, 241, 0.5);
}

.detail-header h3 {
    margin: 0;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    color: #1F2937;
    font-weight: 800;
}

.rarity-badge {
    display: inline-block;
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    text-transform: uppercase;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    background: #E5E7EB;
    color: #6B7280;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.rarity-badge.rara {
    background: #FEF3C7;
    color: #D97706;
}

.rarity-badge.incomum {
    background: #DBEAFE;
    color: #2563EB;
}

.detail-body {
    margin-bottom: clamp(16px, 4vw, 24px);
}

.def-label {
    font-size: clamp(0.7rem, 2.2vw, 0.8rem);
    color: #9CA3AF;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.def-text {
    color: #4B5563;
    font-size: clamp(0.9rem, 3vw, 1.05rem);
    line-height: 1.6;
    margin-bottom: clamp(16px, 4vw, 24px);
}

.curiosity-box {
    background: #EEF2FF;
    border-left: 5px solid #6366F1;
    padding: clamp(12px, 3vw, 16px);
    border-radius: 8px;
    display: flex;
    gap: clamp(10px, 2.5vw, 15px);
    align-items: start;
    box-shadow: 0 2px 5px rgba(99, 102, 241, 0.15);
}

.curiosity-icon {
    font-size: 1.2rem;
}

.curiosity-box p {
    margin: 0;
    font-size: clamp(0.8rem, 2.8vw, 0.9rem);
    color: #4338CA;
    line-height: 1.5;
}

.detail-footer {
    text-align: center;
    font-size: clamp(0.7rem, 2.2vw, 0.8rem);
    color: #9CA3AF;
    margin-top: 10px;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   AD PLACEHOLDER (Consistente com Profile)
============================================ */
.ad-sense-placeholder {
    margin-top: clamp(16px, 4vw, 24px);
    padding: clamp(12px, 3vw, 16px);
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed #D1D5DB;
    border-radius: clamp(6px, 1.5vw, 10px);
    text-align: center;
}

.ad-sense-placeholder p {
    margin: 0;
    font-size: clamp(0.6rem, 2vw, 0.7rem);
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   MODAL PALAVRA BLOQUEADA (Transferido do HTML)
============================================ */
.locked-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.locked-modal-overlay.hidden {
    display: none;
}

.locked-modal-box {
    background: linear-gradient(145deg, #1F2937, #111827);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 280px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.locked-icon-wrapper {
    margin-bottom: 15px;
}

.locked-icon-pulse {
    font-size: 60px;
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.locked-title {
    color: #fff;
    font-size: 22px;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.locked-message {
    color: #9CA3AF;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.locked-btn-ok {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.locked-btn-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.locked-btn-ok:active {
    transform: translateY(0);
}

/* ============================================
   TABS SYSTEM
   ============================================ */
.book-tabs {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 2vw, 12px);
    padding: 0 clamp(12px, 3vw, 20px) 10px;
    background: transparent;
    flex-shrink: 0;
}

.book-tab {
    flex: 1;
    max-width: 180px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    padding: 10px 0;
    font-family: 'Luckiest Guy', cursive;
    /* Updated Font */
    font-weight: 400;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: #4B5563;
    /* Cinza escuro para contraste */
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    position: relative;
    top: 0;
}

.book-tab:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #1F2937;
    transform: translateY(-2px);
}

.book-tab.active {
    background: linear-gradient(135deg, #FFF, #F3F4F6);
    color: #D97706;
    /* Gold/Orange text */
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    opacity: 1;
}

/* Conteúdo das abas */
.book-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-section.hidden {
    display: none;
}

/* ============================================
   PROFILE PLAYER TAB
   ============================================ */
.profile-migrated-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 20px;
}

/* Identity Section */
.identity-section {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(139, 69, 19, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.avatar-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #E0F2F1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.avatar-frame {
    position: absolute;
    top: -4px;
    left: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border-radius: 50%;
    border: 2px solid transparent;
}

.avatar-frame.gold-frame {
    border-color: #FFD700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.edit-avatar-mini {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #845EC2;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.identity-info h2 {
    margin: 0;
    font-family: 'Luckiest Guy', cursive;
    /* Updated Font */
    font-weight: 400;
    font-size: 1.2rem;
    color: #1F2937;
    letter-spacing: 0.5px;
}

.identity-info .p-title {
    display: block;
    font-size: 0.75rem;
    color: #D97706;
    /* Gold/Dark Orange */
    font-weight: 600;
    margin-bottom: 2px;
}

.identity-info .p-username {
    display: block;
    font-size: 0.7rem;
    color: #6B7280;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(139, 69, 19, 0.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.stat-item .s-val {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: #1F2937;
    font-family: 'Luckiest Guy', cursive;
    text-shadow: 1px 1px 0 #FFF;
}

.stat-item .s-label {
    font-size: 0.7rem;
    color: #6B7280;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 4px;
    display: block;
}

.stat-item.rare .s-val {
    color: #D97706;
}

/* Achievements Section inside Book */
#achievements-section {
    margin-top: 10px;
}

.section-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #4B5563;
    margin-bottom: 10px;
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 5px;
}

/* Toast Notification (reused logic but ensured style) */
.book-toast {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.3s ease;
}

/* Name Edit Row */
.name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-btn-mini {
    background: #E5E7EB;
    color: #4B5563;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.edit-btn-mini:hover {
    background: #D1D5DB;
    color: #1F2937;
    transform: scale(1.1);
}

/* Sub Modal General Styles (Reusable) */
.sub-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.sub-modal.hidden {
    display: none;
}

.sub-modal-box {
    background: #FFF;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 320px;
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

.sub-modal-box h3 {
    margin: 0 0 16px 0;
    color: #1F2937;
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.btn-cancel,
.btn-save {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.2s;
}

.btn-cancel {
    background: #F3F4F6;
    color: #4B5563;
}

.btn-cancel:hover {
    background: #E5E7EB;
}

.btn-save {
    background: #00C9A7;
    color: white;
}

.btn-save:hover {
    filter: brightness(1.1);
}