/* ==========================================================================
   ePaper Enterprise CMS — Interactive Background System
   Newspapers, Clippers, Slugs, Journalism Items & Canvas Physics
   ========================================================================== */

/* 1. STAGE & CANVAS */
body.login-body {
    background: #0b0f19 !important;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

#login-interactive-stage {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    perspective: 1200px;
    background:
        radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(139, 92, 246, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.95) 0%, #07090e 100%);
}

#canvas-ink-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.65;
}

/* Background Press Grid Lines */
.bg-press-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Background Crop Marks (Print alignment crosshairs) */
.press-crop-mark {
    position: absolute;
    width: 24px;
    height: 24px;
    pointer-events: none;
    opacity: 0.25;
}
.press-crop-mark::before, .press-crop-mark::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
}
.press-crop-mark::before { left: 11px; top: 0; width: 2px; height: 24px; }
.press-crop-mark::after { top: 11px; left: 0; width: 24px; height: 2px; }

/* 2. FLOATING NODES CONTAINER */
.interactive-nodes-layer {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    pointer-events: auto;
}

/* Shared Node styling */
.interactive-node {
    position: absolute;
    user-select: none;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, filter 0.3s ease;
    will-change: transform;
}

/* 3. NEWSPAPER CARDS */
.interactive-newspaper {
    width: 240px;
    background: #fdfbf7;
    color: #1a1a1a;
    border-radius: 6px;
    padding: 14px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    overflow: hidden;
}

.interactive-newspaper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.np-header {
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 6px;
    margin-bottom: 8px;
    text-align: center;
}

.np-masthead {
    font-family: 'Georgia', serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #111;
    line-height: 1.1;
}

.np-meta {
    display: flex;
    justify-content: space-between;
    font-size: 8.5px;
    color: #666;
    margin-top: 4px;
    font-family: monospace;
    text-transform: uppercase;
    border-top: 1px solid #ddd;
    padding-top: 2px;
}

.np-body {
    display: flex;
    gap: 10px;
}

.np-img-box {
    width: 90px;
    height: 70px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}

.np-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) contrast(110%);
}

.np-text-col {
    flex: 1;
    min-width: 0;
}

.np-headline {
    font-family: 'Georgia', serif;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
    margin-bottom: 4px;
}

.np-snippet {
    font-size: 8px;
    color: #475569;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 6px;
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Hover effects for Newspaper */
.interactive-newspaper:hover {
    transform: translateY(-8px) scale(1.04) rotateX(6deg) rotateY(-6deg) !important;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(99, 102, 241, 0.35);
    z-index: 100 !important;
}

/* 4. CLIPPERS (Cutout News Articles & Paper Snippets) */
.interactive-clipper {
    width: 200px;
    background: #fffdf5;
    border: 1px dashed #d1d5db;
    padding: 12px;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    position: absolute;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 96% 100%, 90% 95%, 85% 100%, 80% 95%, 75% 100%, 70% 95%, 65% 100%, 60% 95%, 55% 100%, 50% 95%, 45% 100%, 40% 95%, 35% 100%, 30% 95%, 25% 100%, 20% 95%, 15% 100%, 10% 95%, 5% 100%, 0 95%);
}

.clipper-tape {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 60px;
    height: 20px;
    background: rgba(243, 232, 196, 0.7);
    border: 1px solid rgba(217, 197, 137, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
}

.clipper-tag {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ef4444;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.clipper-title {
    font-family: 'Georgia', serif;
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 6px;
    text-decoration: underline decoration-red-400 2px;
}

.clipper-excerpt {
    font-size: 8.5px;
    color: #64748b;
    line-height: 1.35;
    background: repeating-linear-gradient(#fffdf5, #fffdf5 11px, #f1f5f9 12px);
    padding: 2px 0;
}

.interactive-clipper:hover {
    transform: translateY(-6px) scale(1.06) rotate(0deg) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 0 15px rgba(239, 68, 68, 0.25);
    z-index: 100 !important;
}

/* 5. SLUGS (Headline Badges / Press Slugs) */
.interactive-slug {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 999px;
    color: #e0e7ff;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.slug-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 1.5s infinite alternate;
}

.slug-code {
    color: #818cf8;
}

.interactive-slug:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: #818cf8;
    color: #ffffff;
    transform: translateY(-4px) scale(1.08) !important;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
    z-index: 100 !important;
}

/* 6. JOURNALISM ITEMS (Ink Stamp, Press Pass, Pen, Loupe, Coffee) */

/* Item: Ink Stamp */
.item-ink-stamp {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.item-ink-stamp i {
    font-size: 24px;
    margin-bottom: 2px;
}

.item-ink-stamp span {
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.item-ink-stamp:hover {
    transform: scale(1.15) rotate(-10deg) !important;
    border-color: #ef4444;
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.4);
}

.item-ink-stamp:active {
    transform: scale(0.9) rotate(5deg) !important;
}

/* Stamped visual effect placed on screen upon click */
.stamped-mark {
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(-12deg);
    border: 3px double #ef4444;
    color: #ef4444;
    padding: 8px 16px;
    font-family: 'Courier New', monospace;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 4px;
    opacity: 0.85;
    z-index: 2;
    animation: stampSlam 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    mask-image: radial-gradient(circle, rgba(0,0,0,1) 70%, rgba(0,0,0,0.6) 100%);
}

@keyframes stampSlam {
    0% { transform: translate(-50%, -50%) scale(2.5) rotate(-12deg); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(-12deg); opacity: 0.85; }
}

/* Item: Press Pass Badge */
.item-press-pass {
    width: 120px;
    height: 160px;
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    padding: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.press-pass-lanyard {
    position: absolute;
    top: -24px;
    width: 16px;
    height: 28px;
    border: 3px solid #6366f1;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.press-pass-header {
    background: #1e1b4b;
    color: #fff;
    width: 100%;
    padding: 3px 0;
    text-align: center;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-top: 4px;
}

.press-pass-photo {
    width: 50px;
    height: 50px;
    background: #cbd5e1;
    border-radius: 6px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #475569;
}

.press-pass-name {
    font-size: 9.5px;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
}

.press-pass-role {
    font-size: 7.5px;
    color: #6366f1;
    font-weight: 700;
    text-transform: uppercase;
}

.item-press-pass:hover {
    transform: translateY(-10px) rotateY(18deg) scale(1.08) !important;
    box-shadow: 0 25px 45px rgba(99, 102, 241, 0.35);
}

/* Item: Coffee Mug with Steam */
.item-coffee-mug {
    width: 65px;
    height: 65px;
    background: #1e293b;
    border: 3px solid #475569;
    border-radius: 50%;
    box-shadow: inset 0 0 15px #020617, 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.coffee-liquid {
    width: 48px;
    height: 48px;
    background: radial-gradient(circle, #451a03 0%, #270e02 100%);
    border-radius: 50%;
    border: 2px solid #78350f;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.15);
    font-size: 14px;
}

.coffee-steam {
    position: absolute;
    top: -15px;
    width: 6px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    filter: blur(4px);
    animation: steamRise 2s infinite ease-out;
}

@keyframes steamRise {
    0% { transform: translateY(0) scaleX(1); opacity: 0; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-20px) scaleX(2); opacity: 0; }
}

.item-coffee-mug:hover {
    transform: scale(1.12) rotate(15deg) !important;
}

/* 7. INTERACTIVE CONTROL HUD FOOTER */
.login-bg-hud {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.8);
    font-size: 11.5px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

.hud-pill-btn {
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hud-pill-btn:hover {
    background: #6366f1;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

/* 8. CLIPPING PREVIEW MODAL POPOVER */
.clipper-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 9, 14, 0.85);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.clipper-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.clipper-modal-card {
    max-width: 520px;
    width: 100%;
    background: #fcfbf7;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    color: #0f172a;
    position: relative;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.clipper-modal-overlay.active .clipper-modal-card {
    transform: scale(1) translateY(0);
}

.clipper-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s ease;
}

.clipper-modal-close:hover {
    background: #ef4444;
    color: #ffffff;
}

.clipper-modal-masthead {
    font-family: 'Georgia', serif;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.clipper-modal-title {
    font-family: 'Georgia', serif;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
    color: #1e1b4b;
}

.clipper-modal-text {
    font-size: 13px;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 16px;
}

.clipper-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    font-family: monospace;
}

/* Animations */
@keyframes pulseDot {
    0% { opacity: 0.4; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 768px) {
    .interactive-newspaper { width: 180px; padding: 10px; }
    .np-img-box { width: 60px; height: 50px; }
    .interactive-clipper { width: 160px; }
    .interactive-slug { font-size: 9.5px; padding: 4px 10px; }
    .login-bg-hud { display: none; }
}
