body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    direction: rtl;
}
header {
    background-color: #007bff; color: white; padding: 1rem; text-align: center; border-radius: 8px; margin-bottom: 20px; position: relative;
}
#auth-status {
    position: absolute; top: 5px; left: 10px; background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 12px; font-size: 12px;
}
.form-container {
    background: white; padding: 20px; margin-bottom: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.view-book-link {
    text-align: center; margin-bottom: 20px; padding: 15px; background: #e9ecef; border-radius: 8px;
}
.view-book-link a {
    font-size: 18px; font-weight: bold; text-decoration: none; color: #007bff;
}
label { display: block; margin-bottom: 5px; font-weight: bold; }
input, textarea {
    width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box;
}
button {
    background-color: #28a745; color: white; padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px;
}
button:hover { background-color: #218838; }
hr { margin: 30px 0; border: 0; border-top: 1px solid #ccc; }
#uploadStatus { margin-top: 15px; font-weight: bold; color: #007bff; }

/* ======== STYLÊN لاپەرا پەرتووکێ ======== */
.book-body {
    padding: 0; background-color: #333; overflow: hidden;
}
#book-container {
    position: relative; width: 100vw; height: 100vh; margin: 0; background: #333; display: flex; justify-content: center; align-items: center;
}
#book-view {
    display: flex; align-items: center; width: 100%; height: 100%; overflow: hidden; font-size: 0;
}
#book-view img {
    width: 100%; height: 100%; object-fit: contain; box-sizing: border-box;
}
#book-view a {
    display: flex; justify-content: center; align-items: center; width: 100%; height: 100%;
}
@media (min-width: 768px) {
    #book-view img, #book-view a {
        width: 50%; height: 100%; object-fit: cover;
    }
}
.nav-btn, .control-btn {
    position: absolute; background-color: rgba(30, 30, 30, 0.5); color: white; border: none; cursor: pointer; z-index: 10; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; user-select: none; opacity: 0; transition: opacity 0.3s ease-in-out;
}
.nav-btn {
    top: 50%; transform: translateY(-50%); font-size: 32px; font-weight: bold;
}
#book-container:hover .nav-btn, #book-container:hover .control-btn { opacity: 1; }
#prev-page-btn { left: 20px; }
#next-page-btn { right: 20px; }
#fullscreen-btn {
    bottom: 20px; right: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 2h-2v3h-3v2h5v-5zm-3-4V5h-3v2h3v3z"/></svg>'); background-repeat: no-repeat; background-position: center; background-size: 24px;
}
body:fullscreen #fullscreen-btn {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/></svg>');
}
.loading-text {
    color: white; font-size: 20px;
}

/* ======== STYLÊN PARASTINA DÎMENÊ (SCREENSHOT) (NUU) ======== */
#screenshot-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: black; color: white; z-index: 9999;
    display: none; /* BI JAVASCRIPTÊ TÊ KONTROLKIRIN */
    justify-content: center; align-items: center; text-align: center; font-size: 24px;
}

/* ======== STYLÊN BIŞKOKA SAZKIRINÊ (INSTALL) (NUU) ======== */
#install-pwa-btn {
    bottom: 20px; left: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>');
    background-repeat: no-repeat; background-position: center; background-size: 24px;
    opacity: 0.7; /* DA HER DEM HINEK XUYA BE */
}
#book-container:hover #install-pwa-btn { opacity: 1; }


/* ======== STYLÊN PARASTINÊ (BERÊ) ======== */
.secure-content {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard */
}
.secure-content img {
    pointer-events: none;
}
@media print {
  body.secure-content * {
    display: none !important;
  }
}