* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, sans-serif;
}

/* BODY CHUNG */
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f7fa;
    color: #1e293b;
    line-height: 1.6;
}

/* ========================================
   HEADER TRÊN CÙNG
======================================== */
.site-header {
    background: linear-gradient(90deg, #22c55e, #0ea5e9);
    padding: 15px 20px 20px;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    background-image: url('s.png'); /* đường dẫn ảnh */
    background-size: cover;        /* ảnh phủ toàn bộ */
    background-position: center;   /* canh giữa ảnh */
    background-repeat: no-repeat;  /* không lặp lại ảnh */
}

/* Logo + tên web */
.header-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* Logo hình tròn */
.circle-logo {
    width: 70px;
    height: 70px;
    background-color: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.4);
}

.circle-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tên web */
.topnav {
    overflow: hidden;
    background-color: transparent;
    position: relative;
    background: rgba(0, 0, 0, 0.45); /* nền mờ */
    backdrop-filter: blur(3px);      /* làm mờ background */
}

.topnav #myLinks {
    display: none;
}

.topnav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    display: block;
    text-shadow: 0 2px 5px rgba(0,0,0,0.7); /* chữ nổi hơn */
}

.topnav a.icon {
    background: transparent;
    display: block;
    position: absolute;
    right: 0;
    top: 0;
}


.active {
    background: transparent;
    color: white;
}
/* ========================================
   KHUNG CHÍNH
======================================== */
.container {
    max-width: 1100px;
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    padding: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr);
    gap: 24px;
    margin: 0 auto;     /* đưa container về đúng giữa */
    align-items: flex-start;
}

/* Header bên trong container */
.header {
    grid-column: 1 / -1;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(120deg, #0ea5e9, #22c55e);
    -webkit-background-clip: text;
    color: transparent;
}

.header p {
    font-size: 13px;
    opacity: 0.8;
    color: #334155;
}

/* Controls: search + filter */
.controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.controls input,
.controls select {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    outline: none;
    background-color: #f9fafb;
}

.controls input {
    min-width: 220px;
}

.controls input:focus,
.controls select:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* ========================================
   DANH SÁCH SÁCH
======================================== */
.book-list {
    border-radius: 16px;
    background: linear-gradient(180deg, #f0f9ff, #ecfdf5);
    padding: 12px;
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

/* Item sách trong list */
.book-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.08s ease,
        box-shadow 0.1s ease, border-color 0.1s ease;
    align-items: center;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.6);
}

.book-item:not(:last-child) {
    margin-bottom: 6px;
}

.book-item:hover {
    background: #e0f2fe;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.18);
}

.book-item.active {
    background: #dcfce7;
    border-color: #22c55e;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
}

/* Ảnh bìa nhỏ */
.book-thumb {
    width: 48px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: linear-gradient(135deg, #22c55e, #0ea5e9);
    flex-shrink: 0;
}

.book-info {
    flex: 1;
}

.book-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #0f172a;
}

.book-meta {
    font-size: 12px;
    opacity: 0.8;
    color: #475569;
}

/* ========================================
   KHU CHI TIẾT BÊN PHẢI
======================================== */
.detail {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 20px;
    background: radial-gradient(circle at top left, #e0f2fe, #ffffff);
    min-height: 260px;
    display: flex;
    flex-direction: column;
}

.detail-top {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.detail-cover {
    width: 180px;
    height: 250px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    object-fit: cover;
    background: #e5e7eb;
    flex-shrink: 0;
}

.detail-text {
    flex: 1;
}

.detail-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #022c22;
}

.detail-author {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 6px;
    color: #0369a1;
}

.detail-genre {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
    color: #15803d;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #047857;
}

.detail-description {
    font-size: 14px;
    line-height: 1.6;
    color: #1f2933;
}

/* Nút hành động */
.actions {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s;
}

/* Nút chính – xanh lam */
.btn-primary {
    background: linear-gradient(120deg, #0ea5e9, #22c55e);
    color: #000000;
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.5);
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* Nút viền – trắng */
.btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5f5;
    color: #0f172a;
}

.btn-outline:hover {
    border-color: #0ea5e9;
    background: #e0f2fe;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    body {
        padding: 12px;
        padding-top: 80px;
    }

    .container {
        grid-template-columns: 1fr;
    }

    .detail-top {
        flex-direction: column;
    }

    .detail-cover {
        width: 140px;
        height: 200px;
    }
}