/*
 * Turn PDF Book Pro - Frontend Styles
 * Version: 2.5.9
 * Author: P Adhil Khan | toolsgi.com
 * Zero-conflict scoped CSS
 */

/* ============================================================
   CSS CUSTOM PROPERTIES (Theme Variables)
   ============================================================ */
.tpbp-container {
    --tpbp-bg:          #0f0f1a;
    --tpbp-bg2:         #1a1a2e;
    --tpbp-bg3:         #16213e;
    --tpbp-surface:     rgba(255,255,255,0.05);
    --tpbp-border:      rgba(255,255,255,0.1);
    --tpbp-text:        #e0e0ff;
    --tpbp-text-muted:  rgba(224,224,255,0.6);
    --tpbp-accent:      #00d4ff;
    --tpbp-accent2:     #7b2fff;
    --tpbp-accent-glow: rgba(0,212,255,0.3);
    --tpbp-btn-text:    #000000;
    --tpbp-page-bg:     #ffffff;
    --tpbp-radius:      14px;
    --tpbp-radius-sm:   8px;
    --tpbp-shadow:      0 20px 60px rgba(0,0,0,0.5);
    --tpbp-transition:  0.25s cubic-bezier(0.4,0,0.2,1);
    --tpbp-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- THEME: Cyberpunk ---- */
.tpbp-theme-cyberpunk { --tpbp-bg:#0d0221; --tpbp-bg2:#1a0533; --tpbp-bg3:#0d0221; --tpbp-accent:#ff00ff; --tpbp-accent2:#00ffff; --tpbp-accent-glow:rgba(255,0,255,0.35); --tpbp-text:#f0e6ff; --tpbp-text-muted:rgba(240,230,255,0.6); --tpbp-border:rgba(255,0,255,0.2); --tpbp-surface:rgba(255,0,255,0.07); }
/* ---- THEME: Punk ---- */
.tpbp-theme-punk { --tpbp-bg:#1a0a0a; --tpbp-bg2:#2d0f0f; --tpbp-bg3:#1a0a0a; --tpbp-accent:#ff4757; --tpbp-accent2:#ffa502; --tpbp-accent-glow:rgba(255,71,87,0.35); --tpbp-text:#ffe0e0; --tpbp-text-muted:rgba(255,224,224,0.6); --tpbp-border:rgba(255,71,87,0.2); --tpbp-surface:rgba(255,71,87,0.07); }
/* ---- THEME: Eggplant ---- */
.tpbp-theme-eggplant { --tpbp-bg:#1a0a2e; --tpbp-bg2:#2d1b4e; --tpbp-bg3:#1a0a2e; --tpbp-accent:#c77dff; --tpbp-accent2:#e040fb; --tpbp-accent-glow:rgba(199,125,255,0.35); --tpbp-text:#f0e0ff; --tpbp-text-muted:rgba(240,224,255,0.6); --tpbp-border:rgba(199,125,255,0.2); --tpbp-surface:rgba(199,125,255,0.07); }
/* ---- THEME: Minimal ---- */
.tpbp-theme-minimal { --tpbp-bg:#f8f9fa; --tpbp-bg2:#ffffff; --tpbp-bg3:#e9ecef; --tpbp-accent:#495057; --tpbp-accent2:#212529; --tpbp-accent-glow:rgba(73,80,87,0.15); --tpbp-text:#212529; --tpbp-text-muted:#6c757d; --tpbp-border:rgba(0,0,0,0.1); --tpbp-surface:rgba(0,0,0,0.04); }
/* ---- THEME: Ocean ---- */
.tpbp-theme-ocean { --tpbp-bg:#03045e; --tpbp-bg2:#023e8a; --tpbp-bg3:#03045e; --tpbp-accent:#00b4d8; --tpbp-accent2:#90e0ef; --tpbp-accent-glow:rgba(0,180,216,0.35); --tpbp-text:#caf0f8; --tpbp-text-muted:rgba(202,240,248,0.6); --tpbp-border:rgba(0,180,216,0.2); --tpbp-surface:rgba(0,180,216,0.07); }
/* ---- THEME: Forest ---- */
.tpbp-theme-forest { --tpbp-bg:#081c15; --tpbp-bg2:#1b4332; --tpbp-bg3:#081c15; --tpbp-accent:#52b788; --tpbp-accent2:#95d5b2; --tpbp-accent-glow:rgba(82,183,136,0.35); --tpbp-text:#d8f3dc; --tpbp-text-muted:rgba(216,243,220,0.6); --tpbp-border:rgba(82,183,136,0.2); --tpbp-surface:rgba(82,183,136,0.07); }
/* ---- THEME: Sunset ---- */
.tpbp-theme-sunset { --tpbp-bg:#1a0a00; --tpbp-bg2:#3d1a00; --tpbp-bg3:#1a0a00; --tpbp-accent:#f4a261; --tpbp-accent2:#e76f51; --tpbp-accent-glow:rgba(244,162,97,0.35); --tpbp-text:#fde8d8; --tpbp-text-muted:rgba(253,232,216,0.6); --tpbp-border:rgba(244,162,97,0.2); --tpbp-surface:rgba(244,162,97,0.07); }
/* ---- THEME: Neon ---- */
.tpbp-theme-neon { --tpbp-bg:#0a0a0a; --tpbp-bg2:#111111; --tpbp-bg3:#0a0a0a; --tpbp-accent:#39ff14; --tpbp-accent2:#00ffff; --tpbp-accent-glow:rgba(57,255,20,0.35); --tpbp-text:#e0ffe0; --tpbp-text-muted:rgba(224,255,224,0.6); --tpbp-border:rgba(57,255,20,0.2); --tpbp-surface:rgba(57,255,20,0.07); }

/* ---- LIGHT MODE OVERRIDE ---- */
.tpbp-mode-light { --tpbp-bg:#f0f4f8; --tpbp-bg2:#ffffff; --tpbp-bg3:#e2e8f0; --tpbp-surface:rgba(0,0,0,0.04); --tpbp-border:rgba(0,0,0,0.1); --tpbp-text:#1a202c; --tpbp-text-muted:#718096; }

/* ============================================================
   RESET & BASE
   ============================================================ */
.tpbp-container *,
.tpbp-container *::before,
.tpbp-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--tpbp-font);
}
.tpbp-container {
    position: relative;
    background: var(--tpbp-bg);
    color: var(--tpbp-text);
    border-radius: var(--tpbp-radius);
    box-shadow: var(--tpbp-shadow), 0 0 0 1px var(--tpbp-border);
    overflow: hidden;
    max-width: 1100px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    isolation: isolate;
}

/* ============================================================
   HEADER  -  FIX: logo position left/center/right
   ============================================================ */
.tpbp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--tpbp-bg2);
    border-bottom: 1px solid var(--tpbp-border);
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}
.tpbp-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    /* Default: left aligned */
    justify-content: flex-start;
}
/* Logo position classes */
.tpbp-logo-pos-left   { justify-content: flex-start !important; }
.tpbp-logo-pos-center { justify-content: center !important; }
.tpbp-logo-pos-right  { justify-content: flex-end !important; }

.tpbp-logo {
    height: 34px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}
.tpbp-tool-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tpbp-accent);
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px var(--tpbp-accent-glow);
    white-space: nowrap;
}
.tpbp-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    flex-shrink: 0;
}

/* Reading Time */
.tpbp-reading-time {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--tpbp-surface);
    border: 1px solid var(--tpbp-border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--tpbp-text-muted);
    white-space: nowrap;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tpbp-reading-time svg {
    width: 13px;
    height: 13px;
    stroke: var(--tpbp-accent);
    flex-shrink: 0;
}
.tpbp-time-display {
    font-weight: 600;
    color: var(--tpbp-accent);
    font-size: 0.72rem;
}

/* ============================================================
   ICON BUTTONS
   ============================================================ */
.tpbp-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--tpbp-border);
    background: var(--tpbp-surface);
    color: var(--tpbp-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tpbp-transition);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.tpbp-icon-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    pointer-events: none;
    flex-shrink: 0;
}
.tpbp-icon-btn:hover {
    background: var(--tpbp-accent);
    border-color: var(--tpbp-accent);
    color: #000;
    box-shadow: 0 0 14px var(--tpbp-accent-glow);
    transform: translateY(-2px) scale(1.05);
}
.tpbp-icon-btn:hover svg { stroke: #000; }
.tpbp-icon-btn:active { transform: translateY(0) scale(0.97); }
.tpbp-icon-btn.tpbp-active {
    background: var(--tpbp-accent);
    border-color: var(--tpbp-accent);
    color: #000;
    box-shadow: 0 0 18px var(--tpbp-accent-glow);
}
.tpbp-icon-btn.tpbp-active svg { stroke: #000; }

/* Sound button states */
.tpbp-sound-off { opacity: 0.6; }
.tpbp-sound-off:hover { opacity: 1; }

/* Mode toggle icons */
.tpbp-mode-light .tpbp-icon-moon { display: none !important; }
.tpbp-mode-light .tpbp-icon-sun  { display: block !important; }

/* ============================================================
   THEME PALETTE DROPDOWN
   ============================================================ */
.tpbp-theme-palette {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--tpbp-bg2);
    border: 1px solid var(--tpbp-border);
    border-radius: var(--tpbp-radius-sm);
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    min-width: 195px;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--tpbp-transition);
    pointer-events: none;
}
.tpbp-theme-palette.tpbp-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}
.tpbp-palette-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: all var(--tpbp-transition);
    color: var(--tpbp-text);
}
.tpbp-palette-item:hover,
.tpbp-palette-item.tpbp-active { border-color: var(--tpbp-accent); background: var(--tpbp-surface); }
.tpbp-palette-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--swatch-bg);
    border: 3px solid var(--swatch-accent);
    box-shadow: 0 0 6px var(--swatch-accent);
    display: block;
}
.tpbp-palette-label { font-size: 0.65rem; font-weight: 600; text-align: center; white-space: nowrap; }

/* ============================================================
   TOOLBAR
   ============================================================ */
.tpbp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: var(--tpbp-bg3);
    border-bottom: 1px solid var(--tpbp-border);
    gap: 10px;
    flex-wrap: wrap;
}
.tpbp-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.tpbp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--tpbp-radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all var(--tpbp-transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}
.tpbp-btn svg { width: 15px; height: 15px; flex-shrink: 0; pointer-events: none; }
.tpbp-btn-primary {
    background: linear-gradient(135deg, var(--tpbp-accent), var(--tpbp-accent2));
    color: #000;
    box-shadow: 0 4px 15px var(--tpbp-accent-glow);
}
.tpbp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--tpbp-accent-glow); filter: brightness(1.1); }
.tpbp-btn-primary:active { transform: translateY(0); }
.tpbp-btn-ghost {
    background: var(--tpbp-surface);
    color: var(--tpbp-text);
    border: 1px solid var(--tpbp-border);
}
.tpbp-btn-ghost:hover { background: var(--tpbp-accent); color: #000; border-color: var(--tpbp-accent); box-shadow: 0 4px 15px var(--tpbp-accent-glow); transform: translateY(-2px); }
.tpbp-btn-ghost:hover svg { stroke: #000; }
.tpbp-btn-nav {
    background: var(--tpbp-surface);
    color: var(--tpbp-text);
    border: 1px solid var(--tpbp-border);
    padding: 9px 20px;
    border-radius: 30px;
}
.tpbp-btn-nav:hover:not(:disabled) { background: var(--tpbp-accent); color: #000; border-color: var(--tpbp-accent); box-shadow: 0 4px 15px var(--tpbp-accent-glow); transform: translateY(-2px); }
.tpbp-btn-nav:hover:not(:disabled) svg { stroke: #000; }
.tpbp-btn-nav:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }

/* Ripple */
.tpbp-ripple-container { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.tpbp-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: scale(0);
    animation: tpbp-ripple-anim 0.6s linear;
    pointer-events: none;
}
@keyframes tpbp-ripple-anim { to { transform: scale(4); opacity: 0; } }
.tpbp-upload-input { display: none; }

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
.tpbp-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--tpbp-transition), visibility 0s linear 0.25s;
    border-radius: inherit;
}
.tpbp-loading-overlay.tpbp-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.tpbp-loading-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.tpbp-spinner { position: relative; width: 60px; height: 60px; }
.tpbp-spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: tpbp-spin 1.2s linear infinite;
}
.tpbp-spinner-ring:nth-child(1) { border-top-color: var(--tpbp-accent); animation-duration: 1.0s; }
.tpbp-spinner-ring:nth-child(2) { inset: 8px; border-right-color: var(--tpbp-accent2); animation-duration: 1.4s; animation-direction: reverse; }
.tpbp-spinner-ring:nth-child(3) { inset: 16px; border-bottom-color: var(--tpbp-accent); animation-duration: 1.8s; }
@keyframes tpbp-spin { to { transform: rotate(360deg); } }
.tpbp-loading-text { color: var(--tpbp-text); font-size: 0.9rem; opacity: 0.8; }
.tpbp-progress-bar { width: 200px; height: 4px; background: var(--tpbp-surface); border-radius: 2px; overflow: hidden; }
.tpbp-progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--tpbp-accent), var(--tpbp-accent2));
    border-radius: 2px;
    animation: tpbp-progress-pulse 2s ease-in-out infinite;
}
@keyframes tpbp-progress-pulse { 0%{width:0%} 50%{width:70%} 100%{width:100%} }

/* ============================================================
   TOAST NOTIFICATION  (save success / theme change)
   ============================================================ */
.tpbp-toast {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--tpbp-bg2);
    border: 1px solid var(--tpbp-accent);
    color: var(--tpbp-accent);
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 20px var(--tpbp-accent-glow);
}
.tpbp-toast.tpbp-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.tpbp-toast.tpbp-toast-error {
    border-color: #ff4757;
    color: #ff4757;
    box-shadow: 0 4px 20px rgba(255,71,87,0.3);
}

/* ============================================================
   BOOK VIEWPORT
   ============================================================ */
.tpbp-viewport {
    position: relative;
    width: 100%;
    background: var(--tpbp-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    overflow: hidden;
    padding: 20px;
}
.tpbp-flipbook {
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--tpbp-border);
    border-radius: 4px;
    position: relative;
    z-index: 2;
}
.tpbp-flipbook .page { background: var(--tpbp-page-bg); overflow: hidden; position: relative; }
.tpbp-flipbook .page canvas {
    display: block;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%; max-height: 100%;
    width: auto !important; height: auto !important;
}

/* ============================================================
   FOCUS MODE  -  Mouse-follow band
   ============================================================ */
.tpbp-focus-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    display: none;
}
.tpbp-focus-top-mask,
.tpbp-focus-bottom-mask {
    position: absolute;
    left: 0; right: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(1px);
    transition: height 0.05s linear, top 0.05s linear;
}
.tpbp-focus-top-mask { top: 0; height: 40%; }
.tpbp-focus-bottom-mask { bottom: 0; height: 40%; }

/* The highlighted reading band */
.tpbp-focus-band {
    position: absolute;
    left: 0; right: 0;
    height: 18%;
    top: 40%;
    background: rgba(0,212,255,0.06);
    border-top: 2px solid var(--tpbp-accent);
    border-bottom: 2px solid var(--tpbp-accent);
    box-shadow: 0 0 20px var(--tpbp-accent-glow), inset 0 0 30px rgba(0,212,255,0.04);
    transition: top 0.05s linear, height 0.05s linear;
    pointer-events: none;
}

/* Close button for focus mode */
.tpbp-focus-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--tpbp-accent);
    background: var(--tpbp-bg2);
    color: var(--tpbp-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    z-index: 60;
    transition: all var(--tpbp-transition);
}
.tpbp-focus-close:hover { background: var(--tpbp-accent); color: #000; }
.tpbp-focus-close svg { width: 13px; height: 13px; pointer-events: none; }

/* ============================================================
   MAGNIFIER GLASS  -  Fixed: shows current page content
   ============================================================ */
.tpbp-magnifier {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid var(--tpbp-accent);
    box-shadow: 0 0 0 2px var(--tpbp-bg), 0 0 20px var(--tpbp-accent-glow);
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
    transform: translate(-50%, -50%);
    background: white;
}
.tpbp-magnifier-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.tpbp-magnifier-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(0,212,255,0.3);
    pointer-events: none;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.tpbp-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--tpbp-bg2);
    border-top: 1px solid var(--tpbp-border);
    flex-wrap: wrap;
}
.tpbp-page-counter { display: flex; align-items: center; gap: 8px; color: var(--tpbp-text-muted); font-size: 0.9rem; }
.tpbp-page-input {
    width: 60px;
    padding: 7px 8px;
    background: var(--tpbp-surface);
    border: 1px solid var(--tpbp-border);
    border-radius: var(--tpbp-radius-sm);
    color: var(--tpbp-text);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: border-color var(--tpbp-transition), box-shadow var(--tpbp-transition);
    -moz-appearance: textfield;
}
.tpbp-page-input::-webkit-outer-spin-button,
.tpbp-page-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tpbp-page-input:focus { outline: none; border-color: var(--tpbp-accent); box-shadow: 0 0 0 3px var(--tpbp-accent-glow); }
.tpbp-total-pages { font-weight: 700; color: var(--tpbp-accent); }

/* ============================================================
   THUMBNAIL STRIP
   ============================================================ */
.tpbp-thumb-strip {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 14px;
    background: var(--tpbp-bg3);
    border-top: 1px solid var(--tpbp-border);
    gap: 8px;
    height: 120px;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--tpbp-accent) var(--tpbp-bg2);
}
.tpbp-thumb-strip::-webkit-scrollbar { height: 5px; }
.tpbp-thumb-strip::-webkit-scrollbar-track { background: var(--tpbp-bg2); border-radius: 3px; }
.tpbp-thumb-strip::-webkit-scrollbar-thumb { background: var(--tpbp-accent); border-radius: 3px; }
.tpbp-thumb {
    flex: 0 0 auto;
    width: 75px;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all var(--tpbp-transition);
    background: var(--tpbp-surface);
}
.tpbp-thumb:hover { border-color: var(--tpbp-accent); transform: translateY(-3px) scale(1.04); box-shadow: 0 6px 16px var(--tpbp-accent-glow); }
.tpbp-thumb.tpbp-thumb-active { border-color: var(--tpbp-accent); box-shadow: 0 0 0 2px var(--tpbp-accent), 0 6px 16px var(--tpbp-accent-glow); transform: translateY(-3px); }
.tpbp-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.tpbp-thumb-num { position: absolute; bottom: 2px; left: 0; right: 0; text-align: center; font-size: 0.62rem; color: var(--tpbp-text-muted); background: rgba(0,0,0,0.5); padding: 1px 0; }

/* ============================================================
   SHARE PANEL
   ============================================================ */
.tpbp-share-panel {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    border-radius: inherit;
}
.tpbp-share-inner {
    background: var(--tpbp-bg2);
    border: 1px solid var(--tpbp-border);
    border-radius: var(--tpbp-radius);
    padding: 28px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.tpbp-share-inner h4 { font-size: 1.1rem; font-weight: 700; color: var(--tpbp-accent); margin-bottom: 18px; }
.tpbp-share-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tpbp-share-buttons a,
.tpbp-share-copy {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tpbp-transition);
    text-decoration: none;
    border: none;
}
.tpbp-share-fb  { background: #1877f2; color: #fff; }
.tpbp-share-tw  { background: #1da1f2; color: #fff; }
.tpbp-share-wa  { background: #25d366; color: #fff; }
.tpbp-share-copy { background: var(--tpbp-surface); color: var(--tpbp-text); border: 1px solid var(--tpbp-border); }
.tpbp-share-buttons a:hover,
.tpbp-share-copy:hover { transform: translateY(-2px); filter: brightness(1.15); box-shadow: 0 6px 16px rgba(0,0,0,0.3); }
.tpbp-share-buttons svg { width: 15px; height: 15px; flex-shrink: 0; }
.tpbp-share-close {
    position: absolute; top: 10px; right: 10px;
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid var(--tpbp-border);
    background: var(--tpbp-surface);
    color: var(--tpbp-text-muted);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--tpbp-transition);
}
.tpbp-share-close:hover { background: var(--tpbp-accent); color: #000; border-color: var(--tpbp-accent); }
.tpbp-share-close svg { width: 13px; height: 13px; pointer-events: none; }

/* ============================================================
   BUBBLE CANVAS
   ============================================================ */
.tpbp-bubble-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 1; border-radius: inherit; }

/* ============================================================
   FULLSCREEN
   ============================================================ */
.tpbp-container.tpbp-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    max-width: none !important;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    z-index: 99999 !important;
    overflow-y: auto;
}
.tpbp-container.tpbp-fullscreen .tpbp-viewport { flex: 1; min-height: 0; }
body.tpbp-fs-active { overflow: hidden !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .tpbp-container { margin: 16px auto; border-radius: 10px; }
    .tpbp-header { padding: 10px 14px; }
    .tpbp-tool-name { font-size: 0.95rem; }
    .tpbp-toolbar { padding: 8px 14px; }
    .tpbp-nav { padding: 10px 14px; gap: 10px; }
    .tpbp-btn-nav { padding: 8px 14px; font-size: 0.8rem; }
    .tpbp-thumb-strip { height: 100px; }
    .tpbp-thumb { width: 62px; }
    .tpbp-reading-time { max-width: 160px; }
    .tpbp-time-display { font-size: 0.65rem; }
}
@media (max-width: 480px) {
    .tpbp-container { margin: 10px auto; border-radius: 8px; }
    .tpbp-header { padding: 8px 10px; }
    .tpbp-toolbar { padding: 7px 10px; }
    .tpbp-toolbar-group { gap: 5px; }
    .tpbp-icon-btn { width: 32px; height: 32px; }
    .tpbp-icon-btn svg { width: 13px; height: 13px; }
    .tpbp-btn { padding: 8px 12px; font-size: 0.8rem; }
    .tpbp-nav { gap: 8px; padding: 8px 10px; }
    .tpbp-thumb-strip { height: 88px; }
    .tpbp-thumb { width: 55px; }
    .tpbp-viewport { padding: 8px; }
    .tpbp-magnifier { width: 120px; height: 120px; }
    .tpbp-reading-time { display: none; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.tpbp-hidden { display: none !important; }
