/* Ledger Terminal Style - Neural Archive - IMPROVED VERSION */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

/* Theme Variables - Blue Cyberpunk (Default) */
:root {
    --primary-color: #0271FC;
    --secondary-color: #5BC9DE;
    --accent-color: #0ea5e9;
    --matrix-color: #0271FC;
    --bg-dark: rgba(0, 10, 30, 0.85);
    --bg-input: rgba(0, 10, 30, 0.9);
    --border-color: #0271FC;
    --glow-color: rgba(2, 113, 252, 0.5);
}

/* Theme Variables - Green Matrix */
body.matrix-theme {
    --primary-color: #00ff41;
    --secondary-color: #00cc33;
    --accent-color: #00ff88;
    --matrix-color: #00ff41;
    --bg-dark: rgba(0, 20, 10, 0.85);
    --bg-input: rgba(0, 20, 10, 0.9);
    --border-color: #00ff41;
    --glow-color: rgba(0, 255, 65, 0.5);
}

/* Theme Variables - Morvath Industry (Rusty/Worn) */
body.morvath-theme {
    --primary-color: #d2691e;
    --secondary-color: #cd853f;
    --accent-color: #ff6347;
    --matrix-color: #b8860b;
    --bg-dark: rgba(20, 10, 5, 0.92);
    --bg-input: rgba(30, 15, 8, 0.95);
    --border-color: #8b4513;
    --glow-color: rgba(210, 105, 30, 0.4);
}
/* Back to Library Button */
.library-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(2, 113, 252, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.library-back-btn:hover {
    background: rgba(2, 113, 252, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
    transform: translateX(-3px);
}

.library-back-btn .btn-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.library-back-btn:hover .btn-icon {
    transform: translateX(-3px);
}

.library-back-btn .btn-text {
    font-size: 0.85rem;
}

/* Theme adaptations */
body.matrix-theme .library-back-btn {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.3);
}

body.matrix-theme .library-back-btn:hover {
    background: rgba(0, 255, 65, 0.2);
    border-color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

body.morvath-theme .library-back-btn {
    background: rgba(139, 69, 19, 0.15);
    border-color: rgba(139, 69, 19, 0.4);
}

body.morvath-theme .library-back-btn:hover {
    background: rgba(139, 69, 19, 0.25);
    border-color: #8B4513;
    box-shadow: 0 0 15px rgba(210, 105, 30, 0.4);
}
/* Override body styles for terminal mode */
body.library-layout {
    font-family: 'Share Tech Mono', monospace;
    background: #000;
    color: var(--primary-color);
    overflow: hidden;
    height: 100vh;
    position: relative;
    transition: color 0.3s ease;
}

body.library-layout::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg, 
        rgba(0, 0, 0, 0.15), 
        rgba(0, 0, 0, 0.15) 1px, 
        transparent 1px, 
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000 !important; /* On top but non-blocking */
    animation: scanline 8s linear infinite;
}

/* Hide header and footer for terminal mode */
body.library-layout header,
body.library-layout footer {
    display: none;
}

body.library-layout main {
    padding: 0;
    margin: 0;
}

/* CRITICAL Z-INDEX FIXES FOR MATRIX RAIN VISIBILITY */
/* Matrix Canvas - MUST BE VISIBLE */
#matrix-canvas {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3 !important; /* Increased visibility */
    z-index: 1 !important; /* Base layer */
    pointer-events: none;
    background: transparent;
}

body.matrix-theme #matrix-canvas {
    opacity: 0.4 !important; /* Even more visible in matrix theme */
}

body.morvath-theme #matrix-canvas {
    opacity: 0.25 !important;
}

/* Screen container - TRANSPARENT BACKGROUND */
.screen-container {
    position: fixed;
    inset: 0;
    background: transparent !important; /* COMPLETELY TRANSPARENT */
    box-shadow: 
        inset 0 0 200px rgba(2, 113, 252, 0.03), 
        inset 0 0 100px rgba(2, 113, 252, 0.05);
    border-radius: 20px;
    overflow: hidden;
    z-index: 2 !important; /* Above matrix but transparent */
    animation: terminalBoot 1.5s ease-out;
    opacity: 1; /* Changed from 0 */
    animation-fill-mode: forwards;
    pointer-events: none; /* Allow clicks through to terminal */
}

.screen-container > * {
    pointer-events: auto; /* Re-enable clicks for children */
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

@keyframes terminalBoot {
    0% {
        opacity: 0;
        transform: scale(0.95);
        filter: brightness(0);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.98);
        filter: brightness(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
}

/* Terminal with semi-transparent background */
.terminal {
    position: relative;
    z-index: 10 !important;
    width: 90%;
    max-width: 1400px;
    height: 90vh;
    margin: 5vh auto;
    background: rgba(0, 10, 30, 0.75) !important; /* Semi-transparent dark blue */
    border: 2px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 0 30px var(--glow-color), inset 0 0 50px rgba(2, 113, 252, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: terminalAppear 0.8s ease-out 0.3s both;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(5px); /* Add blur effect */
    -webkit-backdrop-filter: blur(5px);
}

body.matrix-theme .terminal {
    background: rgba(0, 20, 10, 0.75) !important; /* Semi-transparent dark green */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

body.morvath-theme .terminal {
    background: linear-gradient(135deg, 
        rgba(20, 10, 5, 0.80), 
        rgba(10, 5, 2, 0.85)) !important; /* Semi-transparent brown */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 2px solid var(--border-color);
    box-shadow: 
        0 0 30px var(--glow-color),
        inset 0 0 50px rgba(210, 105, 30, 0.08),
        0 0 0 1px rgba(139, 69, 19, 0.2);
    position: relative;
}

body.morvath-theme .terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 69, 19, 0.03) 2px, rgba(139, 69, 19, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(210, 105, 30, 0.02) 2px, rgba(210, 105, 30, 0.02) 4px),
        radial-gradient(circle at 20% 30%, rgba(139, 69, 19, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(210, 105, 30, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

body.morvath-theme .terminal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 48%, rgba(139, 69, 19, 0.02) 49%, rgba(139, 69, 19, 0.02) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(210, 105, 30, 0.015) 49%, rgba(210, 105, 30, 0.015) 51%, transparent 52%);
    background-size: 20px 20px, 15px 15px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

@keyframes terminalAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Terminal content areas with subtle transparency */
.terminal-header {
    background: linear-gradient(180deg, 
        rgba(2, 113, 252, 0.15), 
        rgba(2, 113, 252, 0.08)) !important;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    transition: background 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

body.matrix-theme .terminal-header {
    background: linear-gradient(180deg, 
        rgba(0, 255, 65, 0.15), 
        rgba(0, 255, 65, 0.08)) !important;
}

body.morvath-theme .terminal-header {
    background: linear-gradient(180deg, 
        rgba(210, 105, 30, 0.20), 
        rgba(139, 69, 19, 0.12)) !important;
}

.terminal-title-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.dripia-logo {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(2, 113, 252, 0.1);
    border: 2px solid rgba(2, 113, 252, 0.3);
    transition: all 0.3s ease;
}

.dripia-logo:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
    transform: scale(1.05);
    cursor: pointer;
    animation: logoHoverGlitch 0.3s ease-in-out;
}

@keyframes logoHoverGlitch {
    0%, 100% { transform: scale(1.05) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-2deg); }
    50% { transform: scale(1.08) rotate(2deg); }
    75% { transform: scale(1.1) rotate(-1deg); }
}

.dripia-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px var(--glow-color));
}

body.matrix-theme .dripia-logo {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.3);
}

body.morvath-theme .dripia-logo {
    background: rgba(210, 105, 30, 0.1);
    border-color: rgba(139, 69, 19, 0.3);
}

.terminal-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
    animation: flicker 3s infinite alternate;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    white-space: nowrap;
}

/* Dripia Quote Popup - Speech Bubble Style (anchored to avatar) */
.dripia-quote-popup.speech-bubble-popup {
    position: fixed;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                transform 0.3s ease-out;
    max-width: 400px;
    /* Position will be set dynamically by JavaScript */
    transform-origin: bottom center;
}

.dripia-quote-popup.speech-bubble-popup.visible {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

.dripia-quote-content.speech-bubble-content {
    background: linear-gradient(135deg, 
        rgba(0, 10, 30, 0.95), 
        rgba(0, 5, 15, 0.98));
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 20px;
    max-width: 400px;
    min-width: 280px;
    box-shadow: 
        0 0 40px var(--glow-color),
        inset 0 0 30px rgba(2, 113, 252, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Speech bubble tail pointing to avatar */
.speech-bubble-tail {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--border-color);
    filter: drop-shadow(0 0 5px var(--glow-color));
    transition: left 0.3s ease;
}

.speech-bubble-tail::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid rgba(0, 10, 30, 0.95);
}

body.matrix-theme .speech-bubble-tail::before {
    border-top-color: rgba(0, 20, 10, 0.95);
}

body.morvath-theme .speech-bubble-tail::before {
    border-top-color: rgba(20, 10, 5, 0.95);
}

/* Tail pointing up (when popup is below avatar) */
.dripia-quote-popup.speech-bubble-popup.tail-up .speech-bubble-tail {
    bottom: auto;
    top: -12px;
    border-top: none;
    border-bottom: 12px solid var(--border-color);
}

.dripia-quote-popup.speech-bubble-popup.tail-up .speech-bubble-tail::before {
    bottom: auto;
    top: 2px;
    border-top: none;
    border-bottom: 10px solid rgba(0, 10, 30, 0.95);
}

body.matrix-theme .dripia-quote-popup.speech-bubble-popup.tail-up .speech-bubble-tail::before {
    border-bottom-color: rgba(0, 20, 10, 0.95);
}

body.morvath-theme .dripia-quote-popup.speech-bubble-popup.tail-up .speech-bubble-tail::before {
    border-bottom-color: rgba(20, 10, 5, 0.95);
}

.dripia-quote-content {
    background: linear-gradient(135deg, 
        rgba(0, 10, 30, 0.95), 
        rgba(0, 5, 15, 0.98));
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    max-width: 500px;
    min-width: 350px;
    box-shadow: 
        0 0 40px var(--glow-color),
        inset 0 0 30px rgba(2, 113, 252, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

body.matrix-theme .dripia-quote-content {
    background: linear-gradient(135deg, 
        rgba(0, 20, 10, 0.95), 
        rgba(0, 10, 5, 0.98));
    border-color: var(--border-color);
    box-shadow: 
        0 0 40px var(--glow-color),
        inset 0 0 30px rgba(0, 255, 65, 0.1);
}

body.morvath-theme .dripia-quote-content {
    background: linear-gradient(135deg, 
        rgba(20, 10, 5, 0.95), 
        rgba(10, 5, 2, 0.98));
    border-color: var(--border-color);
    box-shadow: 
        0 0 40px var(--glow-color),
        inset 0 0 30px rgba(210, 105, 30, 0.1);
}
/* Dripia Quote Popup - Speech Bubble */
.dripia-quote-popup {
    position: fixed;
    display: none;
    opacity: 0;
    z-index: 10000;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.dripia-quote-popup.visible {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto;
}

.speech-bubble-content {
    background: rgba(2, 113, 252, 0.95);
    border: 2px solid #0271FC;
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 
        0 0 30px rgba(2, 113, 252, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    max-width: 400px;
    min-width: 300px;
    position: relative;
}

.speech-bubble-tail {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid #0271FC;
    filter: drop-shadow(0 2px 10px rgba(2, 113, 252, 0.5));
}

.dripia-quote-popup.tail-up .speech-bubble-tail {
    bottom: auto;
    top: -15px;
    border-top: none;
    border-bottom: 15px solid #0271FC;
}

.dripia-quote-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #5BC9DE;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.dripia-quote-text {
    font-family: 'EB Garamond', serif;
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff;
    margin-bottom: 15px;
}

.dripia-quote-close {
    background: rgba(255, 0, 0, 0.8);
    border: 1px solid #ff0000;
    color: #fff;
    padding: 8px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dripia-quote-close:hover {
    background: rgba(255, 0, 0, 1);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
}

.dripia-quote-close:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.dripia-quote-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
    background: rgba(2, 113, 252, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--glow-color);
    animation: avatarPulse 3s ease-in-out infinite;
}

.dripia-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 0 10px var(--glow-color));
}

.dripia-quote-text-container {
    flex: 1;
    min-width: 0;
}

.dripia-quote-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.dripia-quote-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    color: var(--primary-color);
    line-height: 1.6;
    font-style: italic;
    text-shadow: 0 0 10px var(--glow-color);
    position: relative;
}

.dripia-quote-text.glitch-active {
    animation: quoteGlitch 1s ease-in-out;
}

.dripia-quote-close {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: rgba(2, 113, 252, 0.1);
    color: var(--primary-color);
    font-size: 0.7rem !important;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.dripia-quote-close:hover {
    background: rgba(2, 113, 252, 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
    transform: scale(1.05);
}

.dripia-quote-close:active {
    transform: scale(0.95);
}

@keyframes avatarPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--glow-color);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px var(--glow-color), 0 0 50px var(--glow-color);
        transform: scale(1.05);
    }
}

@keyframes quoteGlitch {
    0%, 100% {
        transform: translate(0) scale(1);
        text-shadow: 0 0 10px var(--glow-color);
        filter: hue-rotate(0deg);
    }
    5% {
        transform: translate(-3px, 2px) scale(1.02);
        text-shadow: -3px 0 #ff0000, 3px 0 #00ffff, 0 0 15px var(--glow-color);
        filter: hue-rotate(90deg);
    }
    10% {
        transform: translate(3px, -2px) scale(0.98);
        text-shadow: 3px 0 #ff00ff, -3px 0 #00ff00, 0 0 15px var(--glow-color);
        filter: hue-rotate(180deg);
    }
    15% {
        transform: translate(-2px, 3px) scale(1.01);
        text-shadow: -2px 0 #ffff00, 2px 0 #ff00ff, 0 0 15px var(--glow-color);
        filter: hue-rotate(270deg);
    }
    20% {
        transform: translate(2px, -3px) scale(0.99);
        text-shadow: 2px 0 #00ffff, -2px 0 #ff0000, 0 0 15px var(--glow-color);
        filter: hue-rotate(360deg);
    }
    25% {
        transform: translate(-4px, -2px) scale(1.03);
        text-shadow: -4px 0 #ff00ff, 4px 0 #00ff00, 0 0 20px var(--glow-color);
        filter: hue-rotate(90deg);
    }
    30% {
        transform: translate(4px, 2px) scale(0.97);
        text-shadow: 4px 0 #ffff00, -4px 0 #ff0000, 0 0 20px var(--glow-color);
        filter: hue-rotate(180deg);
    }
    35% {
        transform: translate(-2px, -4px) scale(1.01);
        text-shadow: -2px 0 #00ffff, 2px 0 #ff00ff, 0 0 15px var(--glow-color);
        filter: hue-rotate(270deg);
    }
    40% {
        transform: translate(2px, 4px) scale(0.99);
        text-shadow: 2px 0 #ff0000, -2px 0 #00ff00, 0 0 15px var(--glow-color);
        filter: hue-rotate(360deg);
    }
    50% {
        transform: translate(-1px, 1px) scale(1.01);
        text-shadow: -1px 0 #ff00ff, 1px 0 #00ffff, 0 0 12px var(--glow-color);
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translate(1px, -1px) scale(0.99);
        text-shadow: 1px 0 #ffff00, -1px 0 #ff0000, 0 0 12px var(--glow-color);
        filter: hue-rotate(270deg);
    }
    70% {
        transform: translate(-2px, 2px) scale(1.005);
        text-shadow: -2px 0 #00ffff, 2px 0 #ff00ff, 0 0 10px var(--glow-color);
        filter: hue-rotate(90deg);
    }
    80% {
        transform: translate(2px, -2px) scale(0.995);
        text-shadow: 2px 0 #ff0000, -2px 0 #00ff00, 0 0 10px var(--glow-color);
        filter: hue-rotate(180deg);
    }
    90% {
        transform: translate(0) scale(1);
        text-shadow: 0 0 10px var(--glow-color);
        filter: hue-rotate(0deg);
    }
}

/* Screen-wide glitch effect */
body.screen-glitch-active {
    animation: screenGlitch 0.8s ease-in-out;
}

body.screen-glitch-active::before {
    animation: screenGlitchScanline 0.8s linear;
}

.terminal.screen-shake {
    animation: screenShake 0.8s ease-in-out;
}

@keyframes screenGlitch {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1);
        transform: translate(0);
    }
    10% {
        filter: hue-rotate(90deg) brightness(1.2);
        transform: translate(-2px, 1px);
    }
    20% {
        filter: hue-rotate(180deg) brightness(0.8);
        transform: translate(2px, -1px);
    }
    30% {
        filter: hue-rotate(270deg) brightness(1.1);
        transform: translate(-1px, 2px);
    }
    40% {
        filter: hue-rotate(360deg) brightness(0.9);
        transform: translate(1px, -2px);
    }
    50% {
        filter: hue-rotate(90deg) brightness(1.3);
        transform: translate(-3px, -1px);
    }
    60% {
        filter: hue-rotate(180deg) brightness(0.7);
        transform: translate(3px, 1px);
    }
    70% {
        filter: hue-rotate(270deg) brightness(1.1);
        transform: translate(-2px, -2px);
    }
    80% {
        filter: hue-rotate(360deg) brightness(0.95);
        transform: translate(2px, 2px);
    }
    90% {
        filter: hue-rotate(0deg) brightness(1);
        transform: translate(0);
    }
}

@keyframes screenGlitchScanline {
    0%, 100% { opacity: 0.15; }
    10% { opacity: 0.8; transform: translateY(0); }
    20% { opacity: 0.3; transform: translateY(10px); }
    30% { opacity: 0.9; transform: translateY(-5px); }
    40% { opacity: 0.2; transform: translateY(15px); }
    50% { opacity: 1; transform: translateY(-10px); }
    60% { opacity: 0.4; transform: translateY(5px); }
    70% { opacity: 0.85; transform: translateY(-8px); }
    80% { opacity: 0.25; transform: translateY(12px); }
    90% { opacity: 0.15; transform: translateY(0); }
}

@keyframes screenShake {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-5px, 3px) rotate(-0.5deg); }
    20% { transform: translate(5px, -3px) rotate(0.5deg); }
    30% { transform: translate(-3px, 5px) rotate(-0.3deg); }
    40% { transform: translate(3px, -5px) rotate(0.3deg); }
    50% { transform: translate(-7px, -2px) rotate(-0.7deg); }
    60% { transform: translate(7px, 2px) rotate(0.7deg); }
    70% { transform: translate(-4px, 4px) rotate(-0.4deg); }
    80% { transform: translate(4px, -4px) rotate(0.4deg); }
    90% { transform: translate(0) rotate(0deg); }
}

/* Dripia Warning Popup - Centered on screen */
.dripia-warning-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.dripia-warning-popup.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.dripia-warning-content {
    background: linear-gradient(135deg, 
        rgba(20, 0, 0, 0.98), 
        rgba(10, 0, 0, 0.99));
    border: 3px solid #ff0000;
    border-radius: 12px;
    padding: 30px 40px;
    min-width: 500px;
    max-width: 700px;
    box-shadow: 
        0 0 60px rgba(255, 0, 0, 1),
        inset 0 0 50px rgba(255, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    animation: warningPulse 0.8s ease-in-out;
}

.dripia-warning-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    color: #ff0000;
    text-shadow: 
        0 0 20px #ff0000,
        0 0 40px #ff0000,
        0 0 60px #ff0000;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    line-height: 1.5;
    animation: intenseQuoteGlitch 1.5s ease-in-out;
}

@keyframes warningPulse {
    0%, 100% {
        box-shadow: 
            0 0 50px rgba(255, 0, 0, 0.8),
            inset 0 0 40px rgba(255, 0, 0, 0.3);
    }
    50% {
        box-shadow: 
            0 0 80px rgba(255, 0, 0, 1),
            inset 0 0 60px rgba(255, 0, 0, 0.5);
    }
}

@keyframes intenseQuoteGlitch {
    0%, 100% {
        transform: translate(0) scale(1);
        text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
        filter: hue-rotate(0deg);
    }
    5% {
        transform: translate(-5px, 3px) scale(1.05);
        text-shadow: -5px 0 #ff0000, 5px 0 #00ffff, 0 0 30px #ff0000;
        filter: hue-rotate(90deg);
    }
    10% {
        transform: translate(5px, -3px) scale(0.95);
        text-shadow: 5px 0 #ff00ff, -5px 0 #00ff00, 0 0 30px #ff0000;
        filter: hue-rotate(180deg);
    }
    15% {
        transform: translate(-4px, 4px) scale(1.03);
        text-shadow: -4px 0 #ffff00, 4px 0 #ff00ff, 0 0 35px #ff0000;
        filter: hue-rotate(270deg);
    }
    20% {
        transform: translate(4px, -4px) scale(0.97);
        text-shadow: 4px 0 #00ffff, -4px 0 #ff0000, 0 0 35px #ff0000;
        filter: hue-rotate(360deg);
    }
    25% {
        transform: translate(-6px, -3px) scale(1.06);
        text-shadow: -6px 0 #ff00ff, 6px 0 #00ff00, 0 0 40px #ff0000;
        filter: hue-rotate(90deg);
    }
    30% {
        transform: translate(6px, 3px) scale(0.94);
        text-shadow: 6px 0 #ffff00, -6px 0 #ff0000, 0 0 40px #ff0000;
        filter: hue-rotate(180deg);
    }
    35% {
        transform: translate(-3px, -5px) scale(1.02);
        text-shadow: -3px 0 #00ffff, 3px 0 #ff00ff, 0 0 30px #ff0000;
        filter: hue-rotate(270deg);
    }
    40% {
        transform: translate(3px, 5px) scale(0.98);
        text-shadow: 3px 0 #ff0000, -3px 0 #00ff00, 0 0 30px #ff0000;
        filter: hue-rotate(360deg);
    }
    50% {
        transform: translate(-2px, 2px) scale(1.04);
        text-shadow: -2px 0 #ff00ff, 2px 0 #00ffff, 0 0 25px #ff0000;
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translate(2px, -2px) scale(0.96);
        text-shadow: 2px 0 #ffff00, -2px 0 #ff0000, 0 0 25px #ff0000;
        filter: hue-rotate(270deg);
    }
    70% {
        transform: translate(-4px, 3px) scale(1.01);
        text-shadow: -4px 0 #00ffff, 4px 0 #ff00ff, 0 0 20px #ff0000;
        filter: hue-rotate(90deg);
    }
    80% {
        transform: translate(4px, -3px) scale(0.99);
        text-shadow: 4px 0 #ff0000, -4px 0 #00ff00, 0 0 20px #ff0000;
        filter: hue-rotate(180deg);
    }
    90% {
        transform: translate(0) scale(1);
        text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
        filter: hue-rotate(0deg);
    }
}

@media (max-width: 768px) {
    .dripia-quote-popup {
        top: 60px;
        left: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .dripia-quote-content {
        min-width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .dripia-quote-avatar {
        width: 50px;
        height: 50px;
    }
    
    .dripia-quote-text {
        font-size: 0.85rem;
    }
    
    .dripia-quote-close {
        font-size: 0.6rem;
        padding: 5px 10px;
    }
}

@media (max-width: 768px) {
    .terminal-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .dripia-logo {
        width: 40px;
        height: 40px;
    }
    
    .terminal-title {
        font-size: 1rem;
    }
}

/* Holographic/Glitch effect for title */
.hologram {
    position: relative;
}

.hologram::before {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    text-shadow: -2px 0 var(--secondary-color);
    top: 0;
    color: var(--accent-color);
    overflow: hidden;
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0%, 100% { clip: rect(0, 900px, 0, 0); }
    10% { clip: rect(10px, 9999px, 20px, 0); }
    20% { clip: rect(30px, 9999px, 40px, 0); }
    30% { clip: rect(50px, 9999px, 60px, 0); }
    40% { clip: rect(20px, 9999px, 30px, 0); }
    50% { clip: rect(40px, 9999px, 50px, 0); }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.terminal-status {
    display: flex;
    gap: 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: var(--secondary-color);
    flex-wrap: wrap;
    transition: color 0.3s ease;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    animation: pulse 2s infinite;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Search interface with transparency */
.search-interface {
    padding: 20px;
    border-bottom: 1px solid rgba(2, 113, 252, 0.3);
    background: rgba(2, 113, 252, 0.02) !important; /* Very subtle */
    transition: border-color 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

body.matrix-theme .search-interface {
    border-bottom-color: rgba(0, 255, 65, 0.3);
    background: rgba(0, 255, 65, 0.02) !important;
}

body.morvath-theme .search-interface {
    border-bottom-color: rgba(139, 69, 19, 0.3);
    background: rgba(210, 105, 30, 0.02) !important;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

/* Fix for search input and buttons */
.search-input {
    flex: 1;
    background: rgba(2, 113, 252, 0.08) !important; /* More transparent */
    border: 2px solid #0271FC;
    color: #0271FC;
    padding: 12px 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    border-radius: 5px;
    outline: none;
    box-shadow: inset 0 0 15px rgba(2, 113, 252, 0.2), 0 0 20px rgba(2, 113, 252, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.search-input::placeholder {
    color: rgba(2, 113, 252, 0.6);
    opacity: 1;
}

.search-input:focus {
    box-shadow: inset 0 0 20px rgba(2, 113, 252, 0.3), 0 0 30px rgba(2, 113, 252, 0.4);
    border-color: #0ea5e9;
    background: linear-gradient(135deg, rgba(2, 113, 252, 0.2), rgba(2, 113, 252, 0.1));
}

body.matrix-theme .search-input {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.15), rgba(0, 255, 65, 0.08));
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: inset 0 0 15px rgba(0, 255, 65, 0.2), 0 0 20px rgba(0, 255, 65, 0.1);
}

body.matrix-theme .search-input::placeholder {
    color: rgba(0, 255, 65, 0.6);
}

body.matrix-theme .search-input:focus {
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.3), 0 0 30px rgba(0, 255, 65, 0.4);
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.2), rgba(0, 255, 65, 0.1));
}

body.morvath-theme .search-input {
    background: linear-gradient(135deg, rgba(210, 105, 30, 0.15), rgba(139, 69, 19, 0.08));
    border-color: var(--border-color);
    color: var(--primary-color);
    box-shadow: inset 0 0 15px rgba(210, 105, 30, 0.2), 0 0 20px rgba(139, 69, 19, 0.1);
}

body.morvath-theme .search-input::placeholder {
    color: rgba(210, 105, 30, 0.6);
}

body.morvath-theme .search-input:focus {
    box-shadow: inset 0 0 20px rgba(210, 105, 30, 0.3), 0 0 30px rgba(210, 105, 30, 0.4);
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(210, 105, 30, 0.2), rgba(139, 69, 19, 0.1));
}

/* Theme Selector with Radio Buttons */
.theme-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.theme-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.theme-label {
    padding: 6px 12px;
    background: rgba(2, 113, 252, 0.1);
    border: 1px solid rgba(2, 113, 252, 0.3);
    color: var(--secondary-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    border-radius: 3px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.theme-radio:hover .theme-label {
    background: rgba(2, 113, 252, 0.2);
    border-color: var(--primary-color);
}

.theme-radio input[type="radio"]:checked + .theme-label {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 15px var(--glow-color);
    font-weight: bold;
}

body.matrix-theme .theme-label {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.3);
}

body.matrix-theme .theme-radio:hover .theme-label {
    background: rgba(0, 255, 65, 0.2);
}

body.matrix-theme .theme-radio input[type="radio"]:checked + .theme-label {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
}

body.morvath-theme .theme-label {
    background: rgba(210, 105, 30, 0.1);
    border-color: rgba(139, 69, 19, 0.3);
}

body.morvath-theme .theme-radio:hover .theme-label {
    background: rgba(210, 105, 30, 0.2);
}

body.morvath-theme .theme-radio input[type="radio"]:checked + .theme-label {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
}

.search-btn {
    background: linear-gradient(135deg, 
        rgba(2, 113, 252, 0.8), 
        rgba(14, 165, 233, 0.8)) !important;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 30px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    box-shadow: 0 0 15px var(--glow-color);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.search-btn:hover {
    box-shadow: 0 0 25px var(--glow-color);
    transform: translateY(-2px);
}

.search-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.alphabet-nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.letter-btn {
    width: 32px;
    height: 32px;
    background: rgba(2, 113, 252, 0.1);
    border: 1px solid rgba(2, 113, 252, 0.3);
    color: var(--secondary-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-btn:hover,
.letter-btn.active {
    background: rgba(2, 113, 252, 0.3);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
    transform: scale(1.1);
}

body.matrix-theme .letter-btn {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.3);
}

body.matrix-theme .letter-btn:hover,
body.matrix-theme .letter-btn.active {
    background: rgba(0, 255, 65, 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
}

body.morvath-theme .letter-btn {
    background: rgba(210, 105, 30, 0.1);
    border-color: rgba(139, 69, 19, 0.3);
}

body.morvath-theme .letter-btn:hover,
body.morvath-theme .letter-btn.active {
    background: rgba(210, 105, 30, 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
}

.filter-btn {
    background: rgba(2, 113, 252, 0.1);
    border: 1px solid rgba(2, 113, 252, 0.3);
    color: var(--secondary-color);
    padding: 6px 12px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(2, 113, 252, 0.3);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
}

body.matrix-theme .filter-btn {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.3);
}

body.matrix-theme .filter-btn:hover,
body.matrix-theme .filter-btn.active {
    background: rgba(0, 255, 65, 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
}

body.morvath-theme .filter-btn {
    background: rgba(210, 105, 30, 0.1);
    border-color: rgba(139, 69, 19, 0.3);
}

body.morvath-theme .filter-btn:hover,
body.morvath-theme .filter-btn.active {
    background: rgba(210, 105, 30, 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
}

.filter-select {
    background: rgba(2, 113, 252, 0.1);
    border: 1px solid rgba(2, 113, 252, 0.3);
    color: var(--secondary-color);
    padding: 6px 12px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.filter-select:hover,
.filter-select:focus {
    background: rgba(2, 113, 252, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
}

.filter-select option {
    background: #000;
    color: var(--primary-color);
}

body.matrix-theme .filter-select {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.3);
}

body.matrix-theme .filter-select:hover,
body.matrix-theme .filter-select:focus {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
}

/* Terminal content scrollable area */
.terminal-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--primary-color);
    transition: color 0.3s ease;
    background: rgba(0, 0, 0, 0.2); /* Subtle dark overlay */
}

.terminal-content::-webkit-scrollbar {
    width: 10px;
}

.terminal-content::-webkit-scrollbar-track {
    background: rgba(2, 113, 252, 0.05);
}

.terminal-content::-webkit-scrollbar-thumb {
    background: rgba(2, 113, 252, 0.3);
    border-radius: 5px;
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(2, 113, 252, 0.5);
}

/* Ledger entries with glassmorphism and background image */
.ledger-entry {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(2, 113, 252, 0.02) !important; /* Very subtle fallback */
    border-left: 3px solid var(--border-color); /* Themed vertical line */
    border-radius: 8px;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.5s forwards;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    isolation: isolate;
}

/* Glassmorphism background with image */
.ledger-entry::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--entry-bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25; /* Increased visibility: was 0.15, now 0.25 (+0.10) */
    z-index: -2;
    transition: opacity 0.3s ease;
}

/* Glass overlay */
.ledger-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(2, 113, 252, 0.08) 0%,
        rgba(0, 10, 30, 0.4) 50%,
        rgba(2, 113, 252, 0.08) 100%
    );
    border-radius: 8px;
    z-index: -1;
    transition: all 0.3s ease;
}

/* Enhanced glassmorphism on hover */
.ledger-entry:hover::after {
    opacity: 0.35; /* Increased from 0.25 to maintain +0.10 difference */
}

.ledger-entry:hover::before {
    background: linear-gradient(
        135deg,
        rgba(2, 113, 252, 0.12) 0%,
        rgba(0, 10, 30, 0.5) 50%,
        rgba(2, 113, 252, 0.12) 100%
    );
}

/* Ensure content is above glass layers */
.ledger-entry > * {
    position: relative;
    z-index: 1;
}

body.matrix-theme .ledger-entry {
    background: rgba(0, 255, 65, 0.02) !important;
}

body.matrix-theme .ledger-entry::before {
    background: linear-gradient(
        135deg,
        rgba(0, 255, 65, 0.08) 0%,
        rgba(0, 20, 10, 0.4) 50%,
        rgba(0, 255, 65, 0.08) 100%
    );
}

body.matrix-theme .ledger-entry:hover::before {
    background: linear-gradient(
        135deg,
        rgba(0, 255, 65, 0.12) 0%,
        rgba(0, 20, 10, 0.5) 50%,
        rgba(0, 255, 65, 0.12) 100%
    );
}

body.morvath-theme .ledger-entry {
    background: rgba(210, 105, 30, 0.02) !important;
    border-left-color: var(--border-color); /* Themed vertical line */
}

body.morvath-theme .ledger-entry::before {
    background: linear-gradient(
        135deg,
        rgba(210, 105, 30, 0.10) 0%,
        rgba(20, 10, 5, 0.45) 50%,
        rgba(139, 69, 19, 0.10) 100%
    );
}

body.morvath-theme .ledger-entry:hover::before {
    background: linear-gradient(
        135deg,
        rgba(210, 105, 30, 0.15) 0%,
        rgba(20, 10, 5, 0.55) 50%,
        rgba(139, 69, 19, 0.15) 100%
    );
}

/* Animated scanline effect on hover */
.ledger-entry:hover {
    box-shadow: 
        0 0 20px rgba(2, 113, 252, 0.3),
        inset 0 0 30px rgba(2, 113, 252, 0.1);
    border-left-width: 4px;
    border-left-color: var(--border-color); /* Themed vertical line on hover */
}

body.matrix-theme .ledger-entry:hover {
    box-shadow: 
        0 0 20px rgba(0, 255, 65, 0.3),
        inset 0 0 30px rgba(0, 255, 65, 0.1);
}

body.morvath-theme .ledger-entry:hover {
    box-shadow: 
        0 0 20px rgba(210, 105, 30, 0.3),
        inset 0 0 30px rgba(139, 69, 19, 0.1);
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(2, 113, 252, 0.2); /* Default blue */
    transition: border-color 0.3s ease;
}

/* Themed horizontal line under title */
body.matrix-theme .entry-header {
    border-bottom-color: rgba(0, 255, 65, 0.2);
}

body.morvath-theme .entry-header {
    border-bottom-color: rgba(139, 69, 19, 0.3);
}

.entry-term {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.entry-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease, text-shadow 0.2s ease;
    display: inline-block;
}

.entry-link:hover {
    opacity: 0.85;
    text-shadow: 0 0 15px var(--glow-color), 0 0 25px var(--glow-color);
}

.entry-id {
    font-size: 0.85rem;
    color: var(--secondary-color);
    opacity: 0.7;
    transition: color 0.3s ease;
}

.entry-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.meta-icon {
    color: var(--accent-color);
}

.entry-category {
    background: rgba(14, 165, 233, 0.2);
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    color: var(--accent-color);
    border: 1px solid rgba(14, 165, 233, 0.3);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.entry-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tag {
    background: rgba(91, 201, 222, 0.15);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    color: var(--secondary-color);
    border: 1px solid rgba(91, 201, 222, 0.3);
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

body.matrix-theme .tag {
    background: rgba(0, 255, 65, 0.15);
    border-color: rgba(0, 255, 65, 0.3);
}

.entry-definition {
    color: var(--primary-color);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.entry-extended {
    color: var(--secondary-color);
    line-height: 1.8;
    padding: 15px;
    background: rgba(91, 201, 222, 0.05);
    border-left: 2px solid var(--secondary-color);
    border-radius: 3px;
    font-size: 0.95rem;
    margin-top: 15px;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

body.matrix-theme .entry-extended {
    background: rgba(0, 255, 65, 0.05);
    border-left-color: var(--secondary-color);
}

/* Entry images are now used as background via CSS variable --entry-bg-image with glassmorphism effect */

.system-message {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 15px 0;
    padding: 10px;
    background: rgba(91, 201, 222, 0.05);
    border-left: 2px solid var(--secondary-color);
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

body.matrix-theme .system-message {
    background: rgba(0, 255, 65, 0.05);
    border-left-color: var(--secondary-color);
}

.error-message {
    color: #f00;
    border-left-color: #f00;
    background: rgba(255, 0, 0, 0.05);
}

.success-message {
    color: #22c55e;
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.results-info {
    padding: 10px 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(2, 113, 252, 0.2);
    margin-bottom: 20px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

body.matrix-theme .results-info {
    border-bottom-color: rgba(0, 255, 65, 0.2);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid rgba(2, 113, 252, 0.2);
}

.page-btn {
    background: rgba(2, 113, 252, 0.1);
    border: 1px solid rgba(2, 113, 252, 0.3);
    color: var(--secondary-color);
    padding: 8px 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.page-btn:hover {
    background: rgba(2, 113, 252, 0.3);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

/* Loading animation */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--primary-color);
}

.loading-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    animation: flicker 2s infinite;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(2, 113, 252, 0.2);
    margin: 0 auto;
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    animation: loadProgress 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary-color);
}

@keyframes loadProgress {
    0%, 100% { width: 0%; }
    50% { width: 100%; }
}

/* Boot sequence with proper background */
.boot-sequence {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.98) !important; /* Almost opaque during boot */
    z-index: 9999 !important; /* Highest during boot */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10vh;
    gap: 40px;
}

/* Boot Logos with Glitch Effect - NOW AT TOP */
.boot-logo-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin-bottom: 20px;
    opacity: 0;
    animation: logoContainerAppear 1s ease-in forwards;
    flex-shrink: 0;
    background: transparent !important;
}

@keyframes logoContainerAppear {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
        filter: blur(10px);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) translateY(-5px);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.boot-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent !important;
    filter: drop-shadow(0 0 20px rgba(2, 113, 252, 0.8))
            drop-shadow(0 0 40px rgba(2, 113, 252, 0.5));
}

.boot-logo-primary {
    z-index: 2;
    background: transparent !important;
    animation: logoGlitchPrimary 1.2s infinite;
}

.boot-logo-glitch {
    z-index: 1;
    opacity: 0;
    background: transparent !important;
    animation: logoGlitchSecondary 1.2s infinite;
    filter: drop-shadow(0 0 20px rgba(255, 0, 100, 0.8))
            drop-shadow(0 0 40px rgba(0, 255, 255, 0.5));
}

/* Primary logo glitch animation - IMPROVED INTENSE VERSION */
@keyframes logoGlitchPrimary {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0);
        filter: drop-shadow(0 0 20px rgba(2, 113, 252, 0.8));
    }
    
    /* Quick micro-glitch at 8% */
    8% {
        opacity: 0.9;
        transform: translate(-2px, 1px) scale(1.01);
        clip-path: inset(5% 0 90% 0);
    }
    8.5% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        clip-path: inset(0 0 0 0);
    }
    
    /* Burst 1 at 20% - INTENSIFIED */
    19.5% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    20% {
        opacity: 0.3;
        transform: translate(-8px, 5px) scale(1.05) rotate(-1deg);
        clip-path: inset(10% 0 70% 0);
        filter: drop-shadow(0 0 30px rgba(255, 0, 100, 0.9));
    }
    20.3% {
        opacity: 0;
        transform: translate(6px, -3px) scale(0.95) rotate(1deg);
        clip-path: inset(0 0 0 0);
    }
    20.6% {
        opacity: 1;
        transform: translate(-4px, 2px) scale(1.02);
        clip-path: inset(60% 0 10% 0);
    }
    21% {
        opacity: 0.5;
        transform: translate(3px, -1px) scale(0.98);
        clip-path: inset(20% 0 70% 0);
    }
    22% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0);
        filter: drop-shadow(0 0 20px rgba(2, 113, 252, 0.8));
    }
    
    /* Quick flash at 35% */
    35% {
        opacity: 0.7;
        transform: translate(3px, -2px) scale(1.01);
        clip-path: inset(30% 0 60% 0);
    }
    35.2% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        clip-path: inset(0 0 0 0);
    }
    
    /* Burst 2 at 50% - INTENSIFIED */
    49.5% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    50% {
        opacity: 0.2;
        transform: translate(4px, 8px) scale(1.08) rotate(2deg);
        clip-path: inset(40% 0 40% 0);
        filter: drop-shadow(0 0 25px rgba(0, 255, 255, 0.8));
    }
    50.4% {
        opacity: 0;
        transform: translate(-5px, -4px) scale(0.92) rotate(-1deg);
        clip-path: inset(0 0 0 0);
    }
    50.8% {
        opacity: 0.8;
        transform: translate(2px, 3px) scale(1.03);
        clip-path: inset(70% 0 20% 0);
    }
    51.5% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0);
        filter: drop-shadow(0 0 20px rgba(2, 113, 252, 0.8));
    }
    
    /* Quick micro-glitch at 65% */
    65% {
        opacity: 0.8;
        transform: translate(-3px, 2px) scale(0.99);
        clip-path: inset(15% 0 80% 0);
    }
    65.3% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        clip-path: inset(0 0 0 0);
    }
    
    /* Burst 3 at 80% - EPIC FINALE */
    79.5% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    80% {
        opacity: 0;
        transform: translate(-10px, -3px) scale(1.12) rotate(-2deg);
        clip-path: inset(80% 0 5% 0);
        filter: drop-shadow(0 0 40px rgba(255, 0, 100, 1));
    }
    80.2% {
        opacity: 0.4;
        transform: translate(8px, 6px) scale(0.88) rotate(3deg);
        clip-path: inset(10% 0 85% 0);
    }
    80.5% {
        opacity: 0;
        transform: translate(-6px, -4px) scale(1.06) rotate(-1deg);
        clip-path: inset(50% 0 40% 0);
    }
    80.8% {
        opacity: 0.6;
        transform: translate(5px, 3px) scale(0.94) rotate(2deg);
        clip-path: inset(20% 0 70% 0);
    }
    81.2% {
        opacity: 0;
        transform: translate(-3px, -2px) scale(1.03);
        clip-path: inset(90% 0 5% 0);
    }
    81.8% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0);
        filter: drop-shadow(0 0 20px rgba(2, 113, 252, 0.8));
    }
    
    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0);
        filter: drop-shadow(0 0 20px rgba(2, 113, 252, 0.8));
    }
}

/* Secondary logo glitch animation - IMPROVED INTENSE VERSION */
@keyframes logoGlitchSecondary {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0);
    }
    
    /* Quick flash at 8% */
    8% {
        opacity: 0.6;
        transform: translate(3px, -2px) scale(1.03);
        clip-path: inset(90% 0 5% 0);
    }
    8.5% {
        opacity: 0;
        transform: translate(0, 0) scale(1);
        clip-path: inset(0 0 0 0);
    }
    
    /* Appear during burst 1 - INTENSIFIED */
    19.5% {
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translate(9px, -6px) scale(1.08) rotate(2deg);
        clip-path: inset(70% 0 10% 0);
    }
    20.3% {
        opacity: 0.9;
        transform: translate(-7px, 4px) scale(0.92) rotate(-2deg);
        clip-path: inset(10% 0 60% 0);
    }
    20.6% {
        opacity: 0.7;
        transform: translate(5px, -3px) scale(1.05) rotate(1deg);
        clip-path: inset(40% 0 40% 0);
    }
    21% {
        opacity: 0.5;
        transform: translate(-4px, 3px) scale(0.95) rotate(-1deg);
        clip-path: inset(60% 0 30% 0);
    }
    22% {
        opacity: 0;
        transform: translate(0, 0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0);
    }
    
    /* Quick flash at 35% */
    35% {
        opacity: 0.8;
        transform: translate(-5px, 3px) scale(1.02);
        clip-path: inset(60% 0 30% 0);
    }
    35.2% {
        opacity: 0;
        transform: translate(0, 0) scale(1);
        clip-path: inset(0 0 0 0);
    }
    
    /* Appear during burst 2 - INTENSIFIED */
    49.5% {
        opacity: 0;
    }
    50% {
        opacity: 1;
        transform: translate(-6px, -9px) scale(1.15) rotate(-3deg);
        clip-path: inset(20% 0 60% 0);
    }
    50.4% {
        opacity: 0.8;
        transform: translate(7px, 5px) scale(0.85) rotate(2deg);
        clip-path: inset(70% 0 20% 0);
    }
    50.8% {
        opacity: 0.6;
        transform: translate(-4px, -3px) scale(1.08) rotate(-1deg);
        clip-path: inset(30% 0 60% 0);
    }
    51.5% {
        opacity: 0;
        transform: translate(0, 0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0);
    }
    
    /* Quick flash at 65% */
    65% {
        opacity: 0.7;
        transform: translate(4px, -3px) scale(1.01);
        clip-path: inset(80% 0 15% 0);
    }
    65.3% {
        opacity: 0;
        transform: translate(0, 0) scale(1);
        clip-path: inset(0 0 0 0);
    }
    
    /* Appear during burst 3 - EPIC FINALE */
    79.5% {
        opacity: 0;
    }
    80% {
        opacity: 1;
        transform: translate(12px, 4px) scale(1.2) rotate(-4deg);
        clip-path: inset(5% 0 80% 0);
    }
    80.2% {
        opacity: 0.9;
        transform: translate(-10px, -8px) scale(0.8) rotate(5deg);
        clip-path: inset(85% 0 10% 0);
    }
    80.5% {
        opacity: 0.8;
        transform: translate(8px, 6px) scale(1.15) rotate(-3deg);
        clip-path: inset(15% 0 75% 0);
    }
    80.8% {
        opacity: 0.6;
        transform: translate(-6px, -5px) scale(0.9) rotate(2deg);
        clip-path: inset(75% 0 15% 0);
    }
    81.2% {
        opacity: 0.4;
        transform: translate(5px, 4px) scale(1.1) rotate(-2deg);
        clip-path: inset(25% 0 65% 0);
    }
    81.8% {
        opacity: 0;
        transform: translate(0, 0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0);
    }
    
    100% {
        opacity: 0;
        transform: translate(0, 0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0);
    }
}

/* Boot Text Container */
.boot-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.boot-text {
    color: #0271FC;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1rem;
    text-align: center;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #0271FC;
    width: 0;
    animation: typewriter 1s steps(40) forwards;
}

.boot-text:nth-child(3),
.boot-text.boot-status {
    border-right: none;
}

.boot-status {
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 
        0 0 10px rgba(2, 113, 252, 0.8),
        0 0 20px rgba(2, 113, 252, 0.6),
        0 0 30px rgba(2, 113, 252, 0.4);
    animation: typewriter 0.8s steps(40) forwards, textPulse 2s ease-in-out infinite 1s;
}

.boot-sequence .loading-bar {
    width: 400px;
    max-width: 90%;
    height: 6px;
    background: rgba(2, 113, 252, 0.2);
    margin: 0 auto 40px;
    border-radius: 3px;
    overflow: hidden;
    animation: fadeIn 0.5s ease-in forwards;
    opacity: 0;
}

.boot-sequence .loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #0271FC, #0ea5e9, #0271FC);
    background-size: 200% 100%;
    width: 0%;
    animation: bootLoadProgress 1.5s ease-in-out forwards, gradientShift 2s linear infinite;
    box-shadow: 0 0 20px #0271FC, 0 0 40px rgba(2, 113, 252, 0.5);
}
/* Duplicate rules removed - using main definitions above */

/* ENHANCED STUTTERING LOGO GLITCH - MUCH MORE INTENSE */
.boot-logo-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin-bottom: 20px;
    opacity: 0;
    animation: logoContainerAppear 1s ease-in forwards;
    flex-shrink: 0;
}

.boot-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(2, 113, 252, 0.8))
            drop-shadow(0 0 40px rgba(2, 113, 252, 0.5));
}

.boot-logo-primary {
    z-index: 2;
    animation: stutterGlitchPrimary 2s infinite;
}

.boot-logo-glitch {
    z-index: 1;
    opacity: 0;
    animation: stutterGlitchSecondary 2s infinite;
    filter: drop-shadow(0 0 20px rgba(255, 0, 100, 0.8))
            drop-shadow(0 0 40px rgba(0, 255, 255, 0.5));
}

/* INTENSE STUTTERING ANIMATIONS */
@keyframes stutterGlitchPrimary {
    0%, 5% { opacity: 1; transform: translate(0, 0); }
    
    /* First stutter burst */
    10% { opacity: 0; transform: translate(-3px, 2px); }
    10.5% { opacity: 1; transform: translate(2px, -1px); }
    11% { opacity: 0; transform: translate(-1px, 1px); }
    11.5% { opacity: 1; transform: translate(0, 0); }
    
    15%, 25% { opacity: 1; transform: translate(0, 0); }
    
    /* Second stutter burst */
    30% { opacity: 0; transform: translate(4px, -3px); }
    30.3% { opacity: 1; transform: translate(-2px, 2px); }
    30.6% { opacity: 0; transform: translate(3px, -1px); }
    30.9% { opacity: 1; transform: translate(-1px, 1px); }
    31.2% { opacity: 0; transform: translate(2px, -2px); }
    31.5% { opacity: 1; transform: translate(0, 0); }
    
    40%, 45% { opacity: 1; transform: translate(0, 0); }
    
    /* Third intense stutter */
    50% { opacity: 0; transform: translate(-5px, 3px) scale(1.02); }
    50.2% { opacity: 1; transform: translate(3px, -2px) scale(0.98); }
    50.4% { opacity: 0; transform: translate(-2px, 1px) scale(1.01); }
    50.6% { opacity: 1; transform: translate(4px, -3px) scale(0.99); }
    50.8% { opacity: 0; transform: translate(-3px, 2px) scale(1.02); }
    51% { opacity: 1; transform: translate(2px, -1px) scale(0.98); }
    51.2% { opacity: 0; transform: translate(-1px, 0) scale(1); }
    51.4% { opacity: 1; transform: translate(0, 0) scale(1); }
    
    60%, 70% { opacity: 1; transform: translate(0, 0); }
    
    /* Fourth random stutter */
    75% { opacity: 0; transform: translate(2px, 2px); }
    75.3% { opacity: 1; transform: translate(-1px, -1px); }
    75.6% { opacity: 0; transform: translate(1px, -1px); }
    75.9% { opacity: 1; transform: translate(0, 0); }
    
    80%, 90% { opacity: 1; transform: translate(0, 0); }
    
    /* Final stutter */
    95% { opacity: 0; transform: translate(-2px, 1px); }
    95.5% { opacity: 1; transform: translate(1px, -1px); }
    96% { opacity: 0; transform: translate(0, 1px); }
    96.5% { opacity: 1; transform: translate(0, 0); }
    
    100% { opacity: 1; transform: translate(0, 0); }
}

@keyframes stutterGlitchSecondary {
    0%, 5% { opacity: 0; transform: translate(0, 0); }
    
    /* Shows during first stutter */
    10% { opacity: 1; transform: translate(3px, -2px) scale(1.05); }
    10.5% { opacity: 0.8; transform: translate(-2px, 1px) scale(0.95); }
    11% { opacity: 1; transform: translate(1px, -1px) scale(1.02); }
    11.5% { opacity: 0; transform: translate(0, 0) scale(1); }
    
    15%, 25% { opacity: 0; transform: translate(0, 0); }
    
    /* Shows during second stutter */
    30% { opacity: 1; transform: translate(-4px, 3px) scale(0.97); }
    30.3% { opacity: 0.7; transform: translate(2px, -2px) scale(1.03); }
    30.6% { opacity: 1; transform: translate(-3px, 1px) scale(0.98); }
    30.9% { opacity: 0.5; transform: translate(1px, -1px) scale(1.01); }
    31.2% { opacity: 1; transform: translate(-2px, 2px) scale(0.99); }
    31.5% { opacity: 0; transform: translate(0, 0) scale(1); }
    
    40%, 45% { opacity: 0; transform: translate(0, 0); }
    
    /* Shows during third intense stutter */
    50% { opacity: 1; transform: translate(5px, -3px) scale(0.98) rotate(1deg); }
    50.2% { opacity: 0.8; transform: translate(-3px, 2px) scale(1.02) rotate(-1deg); }
    50.4% { opacity: 1; transform: translate(2px, -1px) scale(0.99) rotate(0.5deg); }
    50.6% { opacity: 0.6; transform: translate(-4px, 3px) scale(1.01) rotate(-0.5deg); }
    50.8% { opacity: 1; transform: translate(3px, -2px) scale(0.98) rotate(1deg); }
    51% { opacity: 0.7; transform: translate(-2px, 1px) scale(1.02) rotate(-0.5deg); }
    51.2% { opacity: 1; transform: translate(1px, 0) scale(1) rotate(0deg); }
    51.4% { opacity: 0; transform: translate(0, 0) scale(1) rotate(0deg); }
    
    60%, 70% { opacity: 0; transform: translate(0, 0); }
    
    /* Shows during fourth stutter */
    75% { opacity: 1; transform: translate(-2px, -2px) scale(1.02); }
    75.3% { opacity: 0.6; transform: translate(1px, 1px) scale(0.98); }
    75.6% { opacity: 1; transform: translate(-1px, 1px) scale(1.01); }
    75.9% { opacity: 0; transform: translate(0, 0) scale(1); }
    
    80%, 90% { opacity: 0; transform: translate(0, 0); }
    
    /* Shows during final stutter */
    95% { opacity: 1; transform: translate(2px, -1px) scale(0.99); }
    95.5% { opacity: 0.5; transform: translate(-1px, 1px) scale(1.01); }
    96% { opacity: 1; transform: translate(0, -1px) scale(0.98); }
    96.5% { opacity: 0; transform: translate(0, 0) scale(1); }
    
    100% { opacity: 0; transform: translate(0, 0); }
}

/* Add chromatic aberration for extra glitch effect */
@keyframes chromaticGlitch {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    20% { 
        text-shadow: 
            -2px 0 #ff0000,
            2px 0 #00ffff;
    }
    21% { text-shadow: 0 0 0 transparent; }
    50% {
        text-shadow: 
            2px 0 #ff00ff,
            -2px 0 #00ff00;
    }
    51% { text-shadow: 0 0 0 transparent; }
    80% {
        text-shadow: 
            -1px 0 #ffff00,
            1px 0 #ff00ff;
    }
    81% { text-shadow: 0 0 0 transparent; }
}

.boot-text {
    animation: typewriter 1s steps(40) forwards, chromaticGlitch 3s infinite;
}

/* Duplicate rules removed - using main definitions above */
@keyframes bootLoadProgress {
    from { width: 0%; }
    to { width: 100%; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes typewriter {
    0% { 
        width: 0;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% { 
        width: 100%;
        opacity: 1;
    }
}

@keyframes textPulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 
            0 0 10px rgba(2, 113, 252, 0.8),
            0 0 20px rgba(2, 113, 252, 0.6),
            0 0 30px rgba(2, 113, 252, 0.4);
    }
    50% {
        opacity: 0.7;
        text-shadow: 
            0 0 5px rgba(2, 113, 252, 0.6),
            0 0 15px rgba(2, 113, 252, 0.4),
            0 0 25px rgba(2, 113, 252, 0.2);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal {
        width: 95%;
        margin: 2.5vh auto;
        min-height: auto;
    }

    .terminal-title {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .terminal-status {
        font-size: 0.75rem;
        gap: 10px;
    }

    .theme-selector {
        width: 100%;
        justify-content: center;
    }

    .search-box {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .entry-term {
        font-size: 1.2rem;
    }

    .terminal-content {
        padding: 15px;
        font-size: 0.85rem;
    }

    .boot-logo-container {
        width: 150px;
        height: 150px;
    }

    .boot-logo-text {
        font-size: 0.75rem;
        bottom: -35px;
    }
}

/* ============================================
   ENTRY DETAIL PAGE - ULTRA CYBERTECH STYLE
   ============================================ */

.entry-terminal {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    background: rgba(0, 10, 30, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Entry Terminal Header */
.entry-terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, 
        rgba(0, 10, 30, 0.95), 
        rgba(0, 5, 15, 0.98));
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 
        0 0 30px var(--glow-color),
        inset 0 0 20px rgba(2, 113, 252, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.entry-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.entry-avatar-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.entry-avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    background: linear-gradient(135deg, 
        rgba(2, 113, 252, 0.2), 
        rgba(0, 10, 30, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 30px var(--glow-color),
        inset 0 0 20px rgba(2, 113, 252, 0.3);
    position: relative;
    animation: avatarPulse 3s ease-in-out infinite;
}

.entry-avatar-letter {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 
        0 0 20px var(--glow-color),
        0 0 40px var(--glow-color);
    font-family: 'Share Tech Mono', monospace;
}

.entry-avatar-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 
        0 0 15px var(--glow-color),
        0 0 30px var(--glow-color);
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.entry-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.entry-status-indicators {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status-badge {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    background: rgba(2, 113, 252, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    box-shadow: 0 0 10px var(--glow-color);
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
}

.status-badge:hover {
    background: rgba(2, 113, 252, 0.2);
    box-shadow: 0 0 20px var(--glow-color);
    transform: scale(1.05);
}

.status-badge.online {
    animation: pulseGlow 2s ease-in-out infinite;
}

.status-badge.category {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.5);
    color: #00ff41;
}

body.matrix-theme .status-badge.category {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

.status-badge.id {
    background: rgba(91, 201, 222, 0.1);
    border-color: rgba(91, 201, 222, 0.5);
    color: #5BC9DE;
}

/* Breadcrumb Navigation */
.entry-breadcrumb {
    padding: 10px 20px;
    margin-bottom: 20px;
    background: rgba(0, 10, 30, 0.6);
    border-left: 3px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
}

.breadcrumb-path {
    color: var(--secondary-color);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.breadcrumb-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px var(--glow-color);
}

.breadcrumb-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--glow-color);
}

.breadcrumb-current {
    color: var(--primary-color);
    font-weight: bold;
    text-shadow: 0 0 10px var(--glow-color);
}

/* Entry Content Area */
.entry-content-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Image Container with Holographic Effect */
.entry-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.entry-image-frame {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid var(--border-color);
    box-shadow: 
        0 0 50px var(--glow-color),
        inset 0 0 30px rgba(2, 113, 252, 0.2);
    background: rgba(0, 10, 30, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.entry-image {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(1.1) contrast(1.1);
    transition: filter 0.3s ease;
}

.entry-image-frame:hover .entry-image {
    filter: brightness(1.2) contrast(1.2);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(2, 113, 252, 0.1) 0%,
        transparent 50%,
        rgba(2, 113, 252, 0.1) 100%
    );
    pointer-events: none;
    animation: overlayShift 4s ease-in-out infinite;
}

.image-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary-color),
        transparent
    );
    opacity: 0.6;
    animation: scanlineMove 3s linear infinite;
    pointer-events: none;
}

/* Entry Sections */
.entry-section {
    background: linear-gradient(135deg, 
        rgba(0, 10, 30, 0.8), 
        rgba(0, 5, 15, 0.9));
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 
        0 0 30px var(--glow-color),
        inset 0 0 20px rgba(2, 113, 252, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.entry-section:hover {
    border-color: var(--primary-color);
    box-shadow: 
        0 0 40px var(--glow-color),
        inset 0 0 30px rgba(2, 113, 252, 0.2);
    transform: translateY(-2px);
}

.entry-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-label {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 
        0 0 10px var(--glow-color),
        0 0 20px var(--glow-color);
    font-family: 'Share Tech Mono', monospace;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        var(--border-color),
        transparent
    );
}

.entry-definition,
.entry-extended {
    color: var(--secondary-color);
    font-size: 1.1rem;
    line-height: 1.8;
    font-family: 'Share Tech Mono', monospace;
    text-shadow: 0 0 5px rgba(2, 113, 252, 0.3);
}

.definition-text,
.extended-text {
    margin: 0;
    color: var(--secondary-color);
}

/* Tags */
.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-badge {
    padding: 8px 16px;
    background: rgba(2, 113, 252, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Share Tech Mono', monospace;
    box-shadow: 0 0 10px var(--glow-color);
    transition: all 0.3s ease;
    cursor: default;
}

.tag-badge:hover {
    background: rgba(2, 113, 252, 0.25);
    box-shadow: 0 0 20px var(--glow-color);
    transform: scale(1.05);
}

/* Entry Footer */
.entry-footer {
    display: flex;
    justify-content: center;
    padding: 30px 0;
    margin-top: 20px;
}

.entry-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: rgba(2, 113, 252, 0.1);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 20px var(--glow-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.entry-back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(2, 113, 252, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.entry-back-btn:hover::before {
    left: 100%;
}

.entry-back-btn:hover {
    background: rgba(2, 113, 252, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px var(--glow-color);
    transform: translateX(-5px);
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.entry-back-btn:hover .btn-icon {
    transform: translateX(-3px);
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Animations */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px var(--glow-color);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color);
        opacity: 0.8;
    }
}

@keyframes overlayShift {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes scanlineMove {
    0% {
        top: 0;
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0.6;
    }
}

/* Theme Adaptations */
body.matrix-theme .entry-terminal-header,
body.matrix-theme .entry-section {
    background: linear-gradient(135deg, 
        rgba(0, 20, 10, 0.95), 
        rgba(0, 10, 5, 0.98));
    border-color: var(--border-color);
    box-shadow: 
        0 0 30px var(--glow-color),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
}

body.morvath-theme .entry-terminal-header,
body.morvath-theme .entry-section {
    background: linear-gradient(135deg, 
        rgba(20, 10, 5, 0.95), 
        rgba(10, 5, 2, 0.98));
    border-color: var(--border-color);
    box-shadow: 
        0 0 30px var(--glow-color),
        inset 0 0 20px rgba(210, 105, 30, 0.1);
}

/* Responsive Design for Entry Page */
@media (max-width: 768px) {
    .entry-terminal {
        padding: 15px;
    }

    .entry-terminal-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .entry-avatar-circle {
        width: 60px;
        height: 60px;
    }

    .entry-avatar-letter {
        font-size: 2rem;
    }

    .entry-avatar-name {
        font-size: 1.3rem;
    }

    .entry-status-indicators {
        justify-content: center;
    }

    .entry-section {
        padding: 20px;
    }

    .section-label {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

    .entry-definition,
    .entry-extended {
        font-size: 1rem;
    }

    .entry-back-btn {
        padding: 12px 25px;
        font-size: 0.8rem;
    }
}

/* ============================================
   DRIPIA ENTRY MESSAGE - Speech Bubble Style
   ============================================ */

.dripia-entry-message {
    margin: 30px 0;
    position: relative;
}

.dripia-message-content {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(0, 10, 30, 0.95), 
        rgba(0, 5, 15, 0.98));
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 25px;
    box-shadow: 
        0 0 40px var(--glow-color),
        inset 0 0 30px rgba(2, 113, 252, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    gap: 15px;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.dripia-message-content:hover {
    border-color: var(--primary-color);
    box-shadow: 
        0 0 50px var(--glow-color),
        inset 0 0 40px rgba(2, 113, 252, 0.2);
    transform: translateY(-2px);
}

.dripia-message-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: rgba(2, 113, 252, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--glow-color);
    animation: avatarPulse 3s ease-in-out infinite;
}

.dripia-message-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 0 10px var(--glow-color));
}

.dripia-message-text-container {
    flex: 1;
    min-width: 0;
}

.dripia-message-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.dripia-message-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
    color: var(--primary-color);
    line-height: 1.6;
    font-style: italic;
    text-shadow: 0 0 10px var(--glow-color);
    position: relative;
}

.dripia-message-tail {
    position: absolute;
    bottom: -12px;
    left: 80px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--border-color);
    filter: drop-shadow(0 0 5px var(--glow-color));
}

.dripia-message-tail::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid rgba(0, 10, 30, 0.95);
}

/* Theme Adaptations for Dripia Message */
body.matrix-theme .dripia-message-content {
    background: linear-gradient(135deg, 
        rgba(0, 20, 10, 0.95), 
        rgba(0, 10, 5, 0.98));
    border-color: var(--border-color);
    box-shadow: 
        0 0 40px var(--glow-color),
        inset 0 0 30px rgba(0, 255, 65, 0.1);
}

body.matrix-theme .dripia-message-tail::before {
    border-top-color: rgba(0, 20, 10, 0.95);
}

body.morvath-theme .dripia-message-content {
    background: linear-gradient(135deg, 
        rgba(20, 10, 5, 0.95), 
        rgba(10, 5, 2, 0.98));
    border-color: var(--border-color);
    box-shadow: 
        0 0 40px var(--glow-color),
        inset 0 0 30px rgba(210, 105, 30, 0.1);
}

body.morvath-theme .dripia-message-tail::before {
    border-top-color: rgba(20, 10, 5, 0.95);
}

/* Responsive Design for Dripia Message */
@media (max-width: 768px) {
    .dripia-message-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }

    .dripia-message-avatar {
        width: 50px;
        height: 50px;
    }

    .dripia-message-text {
        font-size: 0.85rem;
    }

    .dripia-message-tail {
        left: 60px;
    }
}