* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 12px;
    font-family: inherit;
}

.image-container {
    text-align: center;
    margin-bottom: 10px;
    width: 100%;
}

.book_imag {
    height: auto;
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    margin: 0 auto;
}

.table-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
    direction: rtl;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px;
    text-align: right;
    border-bottom: 1px solid #e5e5e5;
    word-wrap: break-word;
}

th {
    background-color: #1e4b6e;
    color: #fff;
    font-weight: bold;
    font-size: 1.05em;
}

.full-width {
    background-color: #1e4b6e;
    color: #fff;
    text-align: center;
    font-size: 1.1em;
}

tr:nth-child(even) td {
    background-color: #f9f9f9;
}

table td:last-child {
    background-color: #f5f5f5;
}

.download-button {
    display: inline-block;
    width: 100%;
    background-color: #2d5986;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background-color 0.25s ease, transform 0.15s ease;
}

.download-button:hover {
    background-color: #1e4b6e;
    transform: translateY(-1px);
}

/* شاشات صغيرة (جوال) */
@media screen and (max-width: 600px) {
    body { font-size: 14px; }
    th, td { padding: 10px; }
    .full-width { font-size: 1em; }
}

/* شاشات كبيرة */
@media screen and (min-width: 601px) {
    body {
        display: flex;
        align-items: stretch;
        gap: 20px;
    }
    .image-container {
        flex: 0 0 34%;
        float: none;
        margin-bottom: 0;
    }
    .book_imag {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
    .table-container {
        flex: 1;
        float: none;
        display: flex;
        flex-direction: column;
    }
    table {
        height: 100%;
        flex: 1;
    }
    td {
        vertical-align: middle;
    }
}

.book_imag {
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.full-width::before {
    content: "📖 ";
}

tr:nth-child(2) td:first-child::before { content: "✍️ "; }
tr:nth-child(3) td:first-child::before { content: "📅 "; }
tr:nth-child(4) td:first-child::before { content: "⬇️ "; }
tr:nth-child(5) td:first-child::before { content: "📝 "; }

/* إبراز عدد التحميلات */
tr:nth-child(4) td:last-child {
    color: #1e4b6e;
    font-weight: bold;
    font-size: 1.3em;
}

.download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.download-button::before {
    content: "⬇";
    font-size: 1.1em;
}
.download-button:hover {
    background-color: #1e4b6e;
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

tr:nth-child(5) td {
    background-color: #fafbfc;
    line-height: 1.7;
}
