/* --- LAYOUT CHUNG --- */
#sbm-inspiration-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sbm-inspiration-page .sbmalpha-wrapper {
    max-width: 100% !important;
    padding-left: 0;
    padding-right: 0;
}

/* Thiết lập font cho nội dung bên dưới (trừ header chính) */
.sbminspire-oracle-section, 
.sbminspire-flow-section {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto 50px auto;
    padding: 20px;
    font-family: 'Roboto', sans-serif !important;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}

/* --- PHẦN 1: ORACLE (BÓI SÁCH) --- */
.sbminspire-oracle-section {
    text-align: center;
    padding: 50px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: 20px;
}

/* --- TIÊU ĐỀ MỤC (Giống Deal Chớp Nhoáng) --- */
.sbminspire-title, 
.sbminspire-flow-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
    font-size: 1.8rem;
    font-weight: 500; /* Đậm nổi bật */
    color: #ffffff;   /* Màu trắng */
    text-shadow: 0 2px 5px rgba(0,0,0,0.6); /* Bóng đổ đen */
    margin-bottom: 1rem;
    position: relative;
    letter-spacing: 1px;
}

/* Gạch chân Xanh Lá */
.sbminspire-title::after,
.sbminspire-flow-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #22c55e; /* Xanh lá */
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sbminspire-subtitle {
    font-size: 1rem;
    color: #f3f4f6;
    margin-bottom: 30px;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* --- LÁ BÀI (Nâng cấp) --- */
.sbminspire-card-scene {
    width: 280px;
    height: 420px;
    margin: 0 auto;
    perspective: 1000px;
    cursor: pointer;
}
.sbminspire-card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}
.sbminspire-card.is-flipped {
    transform: rotateY(180deg);
}
.sbminspire-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Mặt sau lá bài (Đen & Vàng kim) */
.sbminspire-card-back {
    background: radial-gradient(circle at center, #1e293b 0%, #000000 100%);
    border: 3px solid #fcd34d;
}
.sbminspire-pattern {
    position: absolute; inset: 0;
    opacity: 0.15;
    background-image: repeating-linear-gradient(45deg, #fcd34d 0, #fcd34d 1px, transparent 0, transparent 50%);
    background-size: 20px 20px;
}
.sbminspire-icon { 
    font-size: 4rem; 
    filter: drop-shadow(0 0 15px #fcd34d);
    animation: float 3s ease-in-out infinite; 
}
.sbminspire-instruction { 
    margin-top: 25px; 
    font-size: 0.85rem; 
    letter-spacing: 1.5px; 
    text-transform: uppercase; 
    color: #fcd34d;
    font-weight: 600;
}

/* Mặt trước lá bài */
.sbminspire-card-front {
    background: #fff;
    transform: rotateY(180deg);
    padding: 20px;
    border: 4px solid #fff;
    text-align: center;
}
.sbminspire-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow-y: auto;
}
.sbminspire-reset-btn {
    margin-top: 15px;
    padding: 8px 24px;
    border: none;
    background: #22c55e; /* Xanh lá */
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
    font-family: 'Roboto', sans-serif;
}
.sbminspire-reset-btn:hover { background: #16a34a; transform: translateY(-2px); }

/* --- PHẦN 2: BỘ LỌC & GRID --- */
.sbminspire-flow-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
}

/* Nút Lọc (Xanh lá) */
.sbminspire-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.sbminspire-filter-btn {
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.9);
    padding: 8px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    transition: all 0.2s;
    font-family: 'Roboto', sans-serif;
}
.sbminspire-filter-btn:hover, 
.sbminspire-filter-btn.active {
    background: #22c55e; /* Xanh lá */
    color: #fff;
    border-color: #22c55e;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.4);
    transform: translateY(-2px);
}

/* Grid Masonry */
.sbminspire-masonry-grid {
    column-count: 3;
    column-gap: 20px;
}
@media (max-width: 900px) { .sbminspire-masonry-grid { column-count: 2; } }
@media (max-width: 600px) { .sbminspire-masonry-grid { column-count: 1; } }

.sbminspire-item {
    break-inside: avoid;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}
.sbminspire-item:hover { 
    transform: translateY(-5px); 
    border-color: #22c55e;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
}
.sbminspire-item-header img { width: 100%; display: block; object-fit: cover; }
.sbminspire-item-body { padding: 20px 18px; }

/* Sửa lỗi font chữ Trích Dẫn */
.sbminspire-tag { 
    display: inline-block; 
    font-size: 0.75rem; 
    padding: 4px 10px; 
    border-radius: 6px; 
    text-transform: uppercase; 
    font-weight: 700;
    margin-bottom: 12px; 
    font-family: 'Roboto', sans-serif !important;
    letter-spacing: 0.5px;
}
.tag-quote { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.tag-review { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }

.sbminspire-text { 
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem; 
    line-height: 1.6; 
    color: #374151; 
    margin-bottom: 15px; 
    font-weight: 400;
}
.sbminspire-source { 
    font-family: 'Roboto', sans-serif;
    font-size: 0.85rem; 
    color: #6b7280; 
    font-weight: 500; 
    display: block; 
    text-align: right; 
    border-top: 1px dashed #e5e7eb; 
    padding-top: 10px;
    font-style: italic;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* --- [MỚI] Nút Tìm sách trong Popup --- */
.sbminspire-popup-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    padding: 10px 30px;
    background-color: #fff;
    color: #22c55e; /* Chữ xanh */
    border: 2px solid #22c55e; /* Viền xanh */
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.sbminspire-popup-search-btn:hover {
    background-color: #22c55e; /* Nền xanh */
    color: #fff; /* Chữ trắng */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(34, 197, 94, 0.3);
}

.sbminspire-popup-search-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

/* [MỚI] Tùy chỉnh riêng cho Mobile */
@media (max-width: 768px) {
    .sbminspire-oracle-section {
        /* Tạo khoảng cách với mép màn hình điện thoại */
        width: auto !important; /* Ghi đè width 100% cũ */
        margin-left: 15px !important;
        margin-right: 15px !important;
        
        /* Điều chỉnh padding bên trong cho gọn hơn trên mobile */
        padding: 40px 15px !important; 
    }

    /* Nếu muốn phần Dòng Chảy Cảm Hứng bên dưới cũng thẳng hàng */
    .sbminspire-flow-section {
        width: auto !important;
        margin-left: 15px !important;
        margin-right: 15px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Điều chỉnh tiêu đề nhỏ lại chút trên mobile */
    .sbminspire-title, 
    .sbminspire-flow-title {
        font-size: 1.5rem !important;
    }
}