/* RealFlip 3D Pro - Frontend Glassmorphic Viewport Styles */

:root {
    --rf-bg-light:   #fbfaf7;
    --rf-text-light: #1a1a1a;
    --rf-bg-dark:    #121212;
    --rf-text-dark:  #e0e0e0;
    --rf-bg-sepia:   #f4ecd8;
    --rf-text-sepia: #5b4636;
    --rf-accent:     #6c63ff;
    --rf-glass:      rgba(255,255,255,0.12);
    --rf-glass-border: rgba(255,255,255,0.25);
    --rf-blur:       blur(16px);
    --rf-radius:     16px;
    --rf-shadow:     0 8px 32px rgba(0,0,0,0.18);
    --rf-neon:       0 0 12px rgba(108,99,255,0.6);
}

* { box-sizing: border-box; }

.realflip-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--rf-bg-light);
    color: var(--rf-text-light);
    border-radius: var(--rf-radius);
    overflow: hidden;
    box-shadow: var(--rf-shadow);
    transition: background 0.4s ease, color 0.4s ease;
}

.realflip-wrapper.rf-theme-dark {
    background: var(--rf-bg-dark);
    color: var(--rf-text-dark);
}

.realflip-wrapper.rf-theme-sepia {
    background: var(--rf-bg-sepia);
    color: var(--rf-text-sepia);
}

.realflip-viewport {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: inherit;
}

.realflip-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    z-index: 1;
}

.realflip-pages-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

.rf-page-sheet {
    position: relative;
    background: var(--rf-bg-light);
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
    transform-style: preserve-3d;
}

.rf-page-sheet canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.rf-page-gutter-shadow {
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.rf-page-gutter-shadow.left {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.15), transparent);
}

.rf-page-gutter-shadow.right {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.15), transparent);
}

.realflip-loading-screen {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: inherit;
    z-index: 100;
    gap: 16px;
}

.realflip-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(108,99,255,0.2);
    border-top-color: var(--rf-accent);
    border-radius: 50%;
    animation: rf-spin 0.8s linear infinite;
}

@keyframes rf-spin {
    to { transform: rotate(360deg); }
}

/* TOOLBAR */
.realflip-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--rf-glass);
    backdrop-filter: var(--rf-blur);
    -webkit-backdrop-filter: var(--rf-blur);
    border-top: 1px solid var(--rf-glass-border);
    border-bottom: 1px solid var(--rf-glass-border);
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 50;
}

.realflip-toolbar-left,
.realflip-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.realflip-toolbar-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 160px;
}

.rf-btn {
    background: var(--rf-glass);
    border: 1px solid var(--rf-glass-border);
    color: inherit;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s ease;
    backdrop-filter: var(--rf-blur);
    -webkit-backdrop-filter: var(--rf-blur);
    min-width: 38px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.rf-btn:hover {
    background: var(--rf-accent);
    color: #fff;
    box-shadow: var(--rf-neon);
    transform: scale(1.05);
}

.rf-btn:active {
    transform: scale(0.92);
}

.rf-btn.active {
    background: var(--rf-accent);
    color: #fff;
    box-shadow: var(--rf-neon);
}

.rf-page-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--rf-glass);
    border: 1px solid var(--rf-glass-border);
    border-radius: 10px;
    padding: 6px 12px;
    backdrop-filter: var(--rf-blur);
}

.rf-page-input {
    width: 52px;
    background: transparent;
    border: none;
    outline: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: inherit;
}

.rf-page-sep, .rf-page-total {
    font-size: 0.9rem;
    opacity: 0.7;
}

.rf-reading-timer {
    font-size: 0.78rem;
    opacity: 0.75;
    display: flex;
    gap: 4px;
    align-items: center;
}

.rf-autoplay-countdown {
    font-size: 0.78rem;
    color: var(--rf-accent);
    font-weight: 600;
    animation: rf-pulse 1s ease-in-out infinite;
}

@keyframes rf-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* AUDIO PANEL */
.rf-audio-panel {
    background: var(--rf-glass);
    backdrop-filter: var(--rf-blur);
    -webkit-backdrop-filter: var(--rf-blur);
    border: 1px solid var(--rf-glass-border);
    border-radius: var(--rf-radius);
    padding: 20px;
    margin: 8px 16px;
    z-index: 40;
}

.rf-audio-panel h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--rf-accent);
}

.rf-audio-category {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.rf-audio-category span {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 70px;
    opacity: 0.8;
}

.rf-sound-btn {
    background: var(--rf-glass);
    border: 1px solid var(--rf-glass-border);
    color: inherit;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.rf-sound-btn:hover, .rf-sound-btn.playing {
    background: var(--rf-accent);
    color: #fff;
    box-shadow: var(--rf-neon);
}

.rf-volume-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--rf-glass-border);
}

.rf-volume-slider {
    flex: 1;
    accent-color: var(--rf-accent);
    cursor: pointer;
}

.rf-mute-btn {
    background: var(--rf-glass);
    border: 1px solid var(--rf-glass-border);
    color: inherit;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.rf-mute-btn.muted {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

/* SHARE PANEL */
.rf-share-panel {
    background: var(--rf-glass);
    backdrop-filter: var(--rf-blur);
    border: 1px solid var(--rf-glass-border);
    border-radius: var(--rf-radius);
    padding: 20px;
    margin: 8px 16px;
    z-index: 40;
}

.rf-share-inner h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--rf-accent);
}

.rf-share-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rf-share-link {
    background: var(--rf-glass);
    border: 1px solid var(--rf-glass-border);
    color: inherit;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s;
    cursor: pointer;
}

.rf-share-link:hover {
    background: var(--rf-accent);
    color: #fff;
    box-shadow: var(--rf-neon);
}

/* THUMBNAIL TRACK */
.rf-thumbnail-track {
    padding: 12px 16px;
    border-top: 1px solid var(--rf-glass-border);
    background: var(--rf-glass);
    backdrop-filter: var(--rf-blur);
}

.rf-thumb-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.rf-filter-btn {
    background: transparent;
    border: 1px solid var(--rf-glass-border);
    color: inherit;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s;
}

.rf-filter-btn.active {
    background: var(--rf-accent);
    color: #fff;
    border-color: var(--rf-accent);
}

.rf-thumb-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--rf-accent) transparent;
}

.rf-thumb-list {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    min-height: 80px;
}

.rf-thumb-item {
    position: relative;
    flex-shrink: 0;
    width: 60px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: rgba(0,0,0,0.1);
}

.rf-thumb-item:hover {
    transform: scale(1.15);
    border-color: var(--rf-accent);
    box-shadow: var(--rf-neon);
    z-index: 10;
}

.rf-thumb-item.active {
    border-color: var(--rf-accent);
    box-shadow: var(--rf-neon);
}

.rf-thumb-item.search-match {
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245,158,11,0.6);
}

.rf-thumb-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.rf-thumb-item canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* QUOTE TICKER */
.rf-quote-ticker {
    padding: 10px 20px;
    text-align: center;
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.8;
    border-top: 1px solid var(--rf-glass-border);
    transition: opacity 0.4s ease;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.rf-quote-author {
    font-size: 0.75rem;
    font-weight: 700;
    font-style: normal;
    color: var(--rf-accent);
}

/* LENS OVERLAY */
.rf-lens-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 200;
}

.rf-lens-circle {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid var(--rf-accent);
    box-shadow: var(--rf-neon), inset 0 0 20px rgba(108,99,255,0.1);
    overflow: hidden;
    pointer-events: none;
    background: #fbfaf7;
    transform: translate(-50%, -50%);
}

/* Magnified page content canvas inside the lens */
.rf-lens-canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
}

/* Suspended over toolbar/controls or outside valid page content */
.rf-lens-circle.rf-lens-suspended {
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Internal lens +/- controls removed from UI (kept hidden if legacy markup present) */
.rf-lens-controls,
.rf-lens-plus,
.rf-lens-minus {
    display: none !important;
}

/* FOCUS RULER */
.rf-focus-ruler {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 190;
    background: transparent;
}

/* Suspended over controls / animation / non-page areas (keeps feature active) */
.rf-focus-ruler.rf-ruler-suspended {
    visibility: hidden !important;
    opacity: 0 !important;
}

.rf-focus-band {
    position: absolute;
    left: 0;
    width: 100%;
    height: 88px;
    background: #fbfaf7;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.55);
    pointer-events: none;
    overflow: hidden;
    border-top: 2px solid var(--rf-accent);
    border-bottom: 2px solid var(--rf-accent);
}

.rf-focus-canvas {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* PARTICLES */
.rf-particle-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 300;
    overflow: hidden;
}

.rf-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: rf-particle-burst 0.6s ease-out forwards;
}

@keyframes rf-particle-burst {
    0%   { transform: translate(0,0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* READING PROGRESS BAR - thin neon line at top */
.rf-reading-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.08);
    z-index: 1000;
    border-radius: var(--rf-radius) var(--rf-radius) 0 0;
    overflow: hidden;
}

.rf-reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6c63ff, #3b82f6, #00fff5);
    box-shadow: 0 0 8px rgba(108,99,255,0.8), 0 0 16px rgba(59,130,246,0.5);
    transition: width 0.4s ease;
    border-radius: 0 2px 2px 0;
}

/* LOADING SCREEN ENHANCED */
.rf-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px;
    text-align: center;
}

.rf-loading-logo {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a78bfa, #6c63ff, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.rf-loading-title {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.8;
    animation: rf-pulse 1s ease-in-out infinite;
}

.rf-loading-progress-wrap {
    width: 280px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.rf-loading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6c63ff, #3b82f6, #00fff5);
    box-shadow: 0 0 8px rgba(108,99,255,0.8);
    transition: width 0.3s ease;
    border-radius: 3px;
    animation: rf-shimmer 1.5s ease-in-out infinite;
}

@keyframes rf-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.rf-loading-percent {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--rf-accent);
    font-variant-numeric: tabular-nums;
}

.rf-loading-timer {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* PASSWORD GATE */
.rf-password-gate {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10,10,26,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--rf-radius);
}

.rf-gate-inner {
    width: 90%;
    max-width: 480px;
    background: rgba(26,26,53,0.98);
    border: 1px solid rgba(108,99,255,0.3);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 40px rgba(108,99,255,0.2);
    animation: rf-modal-in 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.rf-gate-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 12px;
}

.rf-gate-title {
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #a78bfa, #6c63ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.rf-gate-hint {
    font-size: 0.82rem;
    text-align: center;
    opacity: 0.6;
    margin-bottom: 20px;
}

.rf-gate-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
}

.rf-gate-tab-btn {
    flex: 1;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
    text-align: center;
}

.rf-gate-tab-btn.active {
    background: linear-gradient(135deg, #6c63ff, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(108,99,255,0.4);
}

.rf-gate-tab-content { display: none; }
.rf-gate-tab-content.active { display: block; }

.rf-gate-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(108,99,255,0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.rf-gate-input:focus { border-color: var(--rf-accent); }

.rf-gate-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #6c63ff, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(108,99,255,0.4);
    font-family: inherit;
    margin-bottom: 8px;
}

.rf-gate-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,99,255,0.6); }
.rf-gate-btn:active { transform: translateY(0); }

.rf-gate-btn.rf-gate-social {
    background: linear-gradient(135deg, #1da1f2, #0d8ecf);
    box-shadow: 0 4px 16px rgba(29,161,242,0.3);
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.rf-gate-btn.rf-gate-verify {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 16px rgba(16,185,129,0.3);
    font-size: 0.85rem;
}

.rf-gate-error {
    color: #f87171;
    font-size: 0.82rem;
    text-align: center;
    margin-top: 8px;
    min-height: 20px;
}

.rf-gate-success {
    text-align: center;
    padding: 20px;
}

.rf-gate-success-icon { font-size: 3rem; margin-bottom: 12px; }

.rf-gate-success h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #34d399;
    margin-bottom: 8px;
}

.rf-gate-password-display {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 10px;
    padding: 14px;
    font-family: monospace;
    font-size: 1.4rem;
    font-weight: 900;
    color: #34d399;
    letter-spacing: 3px;
    text-align: center;
    margin: 12px 0;
    cursor: pointer;
    transition: all 0.2s;
}

.rf-gate-password-display:hover { background: rgba(16,185,129,0.2); }

.rf-gate-copy-btn, .rf-gate-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    margin: 4px;
}

.rf-gate-copy-btn { background: rgba(108,99,255,0.2); color: #a78bfa; border: 1px solid rgba(108,99,255,0.3); }
.rf-gate-dl-btn   { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.rf-gate-copy-btn:hover { background: var(--rf-accent); color: #fff; }
.rf-gate-dl-btn:hover   { background: #10b981; color: #fff; }

.rf-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.rf-payment-option {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(108,99,255,0.2);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.82rem;
    font-weight: 600;
    color: inherit;
}

.rf-payment-option:hover {
    background: rgba(108,99,255,0.15);
    border-color: var(--rf-accent);
    box-shadow: var(--rf-neon);
}

.rf-payment-option .rf-po-icon { font-size: 1.5rem; display: block; margin-bottom: 4px; }

.rf-qr-display {
    text-align: center;
    padding: 16px;
}

.rf-qr-display img {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    border: 2px solid rgba(108,99,255,0.3);
    margin-bottom: 8px;
}

.rf-qr-amount {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--rf-accent);
    margin-bottom: 4px;
}

.rf-qr-upi {
    font-size: 0.78rem;
    opacity: 0.6;
    font-family: monospace;
    margin-bottom: 12px;
}

/* SEARCH RESULTS PANEL */
.rf-search-results-panel {
    position: absolute;
    top: 60px;
    left: 16px;
    right: 16px;
    background: rgba(15,15,35,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(108,99,255,0.3);
    border-radius: 14px;
    z-index: 600;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), var(--rf-neon);
    max-height: 320px;
    overflow: hidden;
    animation: rf-dropdown-in 0.18s ease;
}

.rf-search-panel-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rf-search-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(108,99,255,0.15);
}

.rf-search-status {
    font-size: 0.8rem;
    color: var(--rf-accent);
    font-weight: 600;
}

.rf-search-close {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s;
}

.rf-search-close:hover { opacity: 1; background: rgba(255,255,255,0.1); }

.rf-search-results-list {
    overflow-y: auto;
    max-height: 260px;
    padding: 8px;
}

.rf-search-result-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.rf-search-result-item:hover { background: rgba(108,99,255,0.15); }

.rf-sr-page {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--rf-accent);
}

.rf-sr-count {
    font-size: 0.72rem;
    opacity: 0.5;
    margin-left: 8px;
}

.rf-sr-snippet {
    font-size: 0.78rem;
    opacity: 0.7;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ANNOTATION COLOR PICKER */
.rf-color-picker {
    position: absolute;
    top: 60px;
    right: 16px;
    display: flex;
    gap: 8px;
    background: rgba(15,15,35,0.97);
    border: 1px solid rgba(108,99,255,0.3);
    border-radius: 12px;
    padding: 10px 14px;
    z-index: 500;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: rf-dropdown-in 0.18s ease;
}

.rf-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.rf-color-dot:hover, .rf-color-dot.selected {
    border-color: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* MEATBALL MORE DROPDOWN */
.rf-more-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 16px;
    background: rgba(20,20,40,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--rf-glass-border);
    border-radius: 14px;
    padding: 8px;
    z-index: 500;
    min-width: 180px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4), var(--rf-neon);
    animation: rf-dropdown-in 0.18s ease;
}

@keyframes rf-dropdown-in {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.rf-more-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: #e0e0ff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.15s;
    text-align: left;
}

.rf-more-item:hover {
    background: var(--rf-accent);
    color: #fff;
    box-shadow: var(--rf-neon);
}

/* THUMBNAIL TOPBAR */
.rf-thumb-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 12px;
    flex-wrap: wrap;
}

.rf-thumb-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--rf-glass);
    border: 1px solid var(--rf-glass-border);
    border-radius: 20px;
    padding: 5px 12px;
    backdrop-filter: var(--rf-blur);
}

.rf-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
    font-size: 0.8rem;
    width: 120px;
}

.rf-search-input::placeholder { opacity: 0.5; }

/* BMC WIDGET */
.rf-bmc-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255,213,79,0.12), rgba(255,152,0,0.08));
    border-top: 1px solid rgba(255,213,79,0.2);
    text-align: center;
}

.rf-bmc-qr {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    border: 2px solid rgba(255,213,79,0.4);
}

.rf-bmc-text {
    font-size: 0.8rem;
    opacity: 0.8;
    max-width: 320px;
    line-height: 1.5;
}

.rf-bmc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ffdd57, #ff9800);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(255,152,0,0.3);
}

.rf-bmc-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,152,0,0.5);
}

/* TRUSTPILOT WIDGET */
.rf-trustpilot-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(0,182,122,0.1), rgba(0,182,122,0.05));
    border-top: 1px solid rgba(0,182,122,0.2);
    text-align: center;
}

.rf-tp-logo {
    height: 28px;
    object-fit: contain;
}

.rf-tp-text {
    font-size: 0.8rem;
    opacity: 0.8;
}

.rf-tp-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #00b67a, #007a52);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(0,182,122,0.3);
}

.rf-tp-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,182,122,0.5);
}

/* NOTES PANEL */
.rf-notes-panel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 320px;
    max-height: 420px;
    background: rgba(15,15,35,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--rf-glass-border);
    border-radius: 16px 0 0 0;
    z-index: 400;
    box-shadow: -8px -8px 32px rgba(0,0,0,0.3);
    animation: rf-slide-up 0.2s ease;
}

@keyframes rf-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rf-notes-inner {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.rf-notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rf-notes-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rf-accent);
}

.rf-notes-close {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s;
}

.rf-notes-close:hover { opacity: 1; background: rgba(255,255,255,0.1); }

.rf-notes-page-label {
    font-size: 0.78rem;
    opacity: 0.6;
}

.rf-notes-textarea {
    width: 100%;
    height: 120px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--rf-glass-border);
    border-radius: 10px;
    padding: 10px;
    color: inherit;
    font-size: 0.85rem;
    resize: vertical;
    outline: none;
    font-family: inherit;
    line-height: 1.5;
}

.rf-notes-textarea:focus { border-color: var(--rf-accent); }

.rf-notes-save {
    background: var(--rf-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: var(--rf-neon);
}

.rf-notes-save:hover { transform: translateY(-1px); }

.rf-notes-list {
    overflow-y: auto;
    max-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rf-note-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.78rem;
    border-left: 3px solid var(--rf-accent);
}

.rf-note-item .rf-note-page {
    font-weight: 700;
    color: var(--rf-accent);
    font-size: 0.72rem;
    margin-bottom: 3px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .realflip-toolbar {
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px;
    }
    .realflip-toolbar-left,
    .realflip-toolbar-right {
        justify-content: center;
    }
    .rf-btn { padding: 8px 10px; font-size: 0.9rem; min-width: 34px; min-height: 34px; }
    .rf-share-grid { gap: 6px; }
    .rf-share-link { padding: 5px 10px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .realflip-toolbar-right .rf-btn:nth-child(n+6) { display: none; }
    .rf-btn.rf-more { display: flex !important; }
}

/* STYLE VARIANTS */
.realflip-style-cyberpunk {
    --rf-accent: #00fff5;
    --rf-glass: rgba(0,255,245,0.08);
    --rf-glass-border: rgba(0,255,245,0.2);
    --rf-neon: 0 0 16px rgba(0,255,245,0.7);
    background: #0a0a1a;
    color: #e0e0ff;
}

.realflip-style-minimal {
    --rf-glass: rgba(255,255,255,0.6);
    --rf-glass-border: rgba(0,0,0,0.1);
    --rf-blur: blur(8px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.realflip-style-elegant {
    --rf-accent: #c9a84c;
    --rf-glass: rgba(201,168,76,0.1);
    --rf-glass-border: rgba(201,168,76,0.3);
    --rf-neon: 0 0 12px rgba(201,168,76,0.5);
    background: #1a1208;
    color: #f5e6c8;
}
