/* FuturiseYou book reader */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:  #071126;
    --dark:  #0F172A;
    --red:   #C63A43;
    --gold:  #FF9900;
    --muted: #64748B;
    --border:#1E293B;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: #1E293B;
    color: #F1F5F9;
    overflow: hidden;
    user-select: none;         /* prevent text selection */
    -webkit-user-select: none;
}

/* ── TOP BAR ── */
.rdr-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: var(--navy);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    gap: 12px;
}

.rdr-nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.rdr-nav-left img {
    height: 32px;
    width: auto;
    pointer-events: none;
}

.rdr-book-info { border-left: 1px solid var(--border); padding-left: 14px; }
.rdr-book-info .bt { font-family: 'Manrope',sans-serif; font-size: 0.82rem; font-weight: 800; color: #F1F5F9; }
.rdr-book-info .ba { font-size: 0.72rem; color: var(--muted); margin-top: 1px; }

.rdr-nav-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.rdr-pg-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: #F1F5F9;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}
.rdr-pg-btn:hover:not(:disabled) { background: rgba(255,255,255,0.07); border-color: #475569; }
.rdr-pg-btn:disabled { opacity: 0.3; cursor: default; }

.rdr-pg-info {
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
}

.rdr-pg-input {
    width: 52px;
    padding: 5px 8px;
    text-align: center;
    background: var(--dark);
    border: 1.5px solid var(--border);
    border-radius: 6px;
    color: #F1F5F9;
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}
.rdr-pg-input:focus { border-color: var(--red); }

.rdr-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rdr-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    transition: transform 0.15s;
}
.rdr-buy-btn:hover { transform: translateY(-1px); }
.btn-amz  { background: #FF9900; color: #000; }
.btn-gum  { background: var(--red); color: #fff; }
.btn-back { background: rgba(255,255,255,0.07); color: #94A3B8; border: 1px solid var(--border); }

/* ── PROGRESS BAR ── */
.rdr-progress {
    width: 0.47%;
    position: fixed;
    top: 60px; left: 0;
    height: 3px;
    background: var(--red);
    z-index: 99;
    transition: width 0.3s ease;
}

/* ── PAGE DISPLAY ── */
.rdr-stage {
    position: fixed;
    top: 63px; bottom: 60px;
    left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #334155;
}

.rdr-page-wrap {
    position: relative;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rdr-page-img {
    max-height: calc(100vh - 123px);
    max-width: 100%;
    width: auto;
    display: block;
    box-shadow: 0 8px 48px rgba(0,0,0,0.5);
    pointer-events: none;   /* disables right-click context menu on image */
    -webkit-user-drag: none;
    draggable: false;
}

/* Loading spinner */
.rdr-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #334155;
}
.rdr-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── BOTTOM BAR ── */
.rdr-bottom {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--navy);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 12px;
}

.rdr-hint {
    font-size: 0.75rem;
    color: var(--muted);
}

.rdr-zoom-btns {
    display: flex;
    gap: 6px;
}
.rdr-zoom-btn {
    width: 32px; height: 32px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: #F1F5F9;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.rdr-zoom-btn:hover { background: rgba(255,255,255,0.07); }

.rdr-like {
    font-size: 0.78rem;
    color: var(--muted);
}

/* ── Watermark overlay (extra deterrent) ── */
.rdr-watermark {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;  /* invisible but in DOM — prevents clean screenshot */
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .rdr-book-info, .rdr-nav-right .rdr-buy-btn { display: none; }
    .rdr-bottom .rdr-hint { display: none; }
    .rdr-nav-right .btn-back { display: flex; }
}
