/* SEARCH BAR */
.search-bar {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* DARK MODE BUTTON */
.dark-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1e3a5f;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
}

/* DARK MODE STYLING */
.dark-mode {
    background: #121212 !important;
    color: #ffffff !important;
}

.dark-mode section {
    background: #1e1e1e;
}

.dark-mode header,
.dark-mode footer {
    background: #000;
}

.dark-mode input,
.dark-mode textarea {
    background: #333;
    color: white;
    border: 1px solid #555;
}















/* =========================
   GLOBAL STYLES
========================= */
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #222;
    transition: 0.3s;
}

/* =========================
   HEADER
========================= */
header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 32px;
    letter-spacing: 2px;
}

/* =========================
   NAVIGATION
========================= */
nav a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    transition: 0.3s;
}

nav a:hover {
    color: #ffd700;
}

/* =========================
   MAIN LAYOUT
========================= */
main {
    padding: 20px;
}

/* =========================
   SECTIONS
========================= */
section {
    background: white;
    margin: 20px auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 1100px;
}

/* =========================
   HEADINGS
========================= */
h2 {
    color: #1e3c72;
    border-left: 5px solid #2a5298;
    padding-left: 10px;
}

/* =========================
   IMAGES
========================= */
img {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 10px;
}

/* =========================
   BOOK CARDS
========================= */
#books div {
    display: inline-block;
    width: 200px;
    margin: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: 0.3s;
}

#books div:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* =========================
   SEARCH BAR
========================= */
.search-bar {
    padding: 10px;
    width: 100%;
    max-width: 400px;
    margin: 10px 0;
    border: 2px solid #2a5298;
    border-radius: 8px;
    outline: none;
}

/* =========================
   BUTTONS
========================= */
button {
    background: #2a5298;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

button:hover {
    background: #1e3c72;
}

/* =========================
   DARK MODE BUTTON
========================= */
.dark-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 15px;
    border-radius: 50px;
    border: none;
    background: #111;
    color: white;
    cursor: pointer;
    z-index: 999;
}

/* =========================
   FORM
========================= */
form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
}

input, textarea {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
}

/* =========================
   FOOTER
========================= */
footer {
    text-align: center;
    padding: 15px;
    background: #1e3c72;
    color: white;
    margin-top: 20px;
}

/* =========================
   READER SYSTEM
========================= */
.reader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    overflow-y: auto;
}

.reader-content {
    padding: 20px;
    max-width: 800px;
    margin: auto;
}

.reader-text {
    margin-top: 20px;
    line-height: 1.8;
    font-size: 16px;
    white-space: pre-line;
}

#closeReader {
    font-size: 30px;
    cursor: pointer;
    float: right;
}

/* =========================
   DARK MODE
========================= */
.dark-mode {
    background: #0f172a;
    color: #e5e7eb;
}

.dark-mode section {
    background: #1e293b;
    color: #e5e7eb;
}

.dark-mode header {
    background: linear-gradient(135deg, #000000, #1e293b);
}

.dark-mode nav a {
    color: #e5e7eb;
}

.dark-mode nav a:hover {
    color: #ffd700;
}

.dark-mode #books div {
    background: #334155;
    color: white;
}

.dark-mode .reader {
    background: #0f172a;
    color: white;
}

/* =========================
   RESPONSIVE DESIGN
========================= */
@media screen and (max-width: 768px) {

    header h1 {
        font-size: 24px;
    }

    nav a {
        display: inline-block;
        margin: 5px;
    }

    #books div {
        width: 90%;
        display: block;
        margin: 10px auto;
    }

    form {
        width: 100%;
    }
}