/* CONVO_LOGG3R v2 Interface */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css");

:root {
    --bg: #080b10;
    --panel: #11151c;
    --accent: #00ff9e;
    --muted: #4f6664;
    --host: #399cbd;
    --friend: #5ad7ff;
    --invited: #ffae63;
    --text: #c5ffd7;
    --danger: #ff5f5f;
    --warning: #ffaa2e;
    --success: #28c840;
}

* {
    box-sizing: border-box;
    font-family: 'IBM Plex Mono', monospace;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.4;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: var(--panel);
    border-bottom: 1px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 18px;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

.nav a.active {
    color: var(--accent);
}

.nav a::after {
    content: '';
    display: block;
    height: 2px;
    width: 0;
    background: var(--accent);
    transition: width 0.3s;
    position: absolute;
    bottom: -4px;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Terminal-style panels */
.terminal {
    background: var(--panel);
    border: 1px solid var(--accent);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--bg);
}

.terminal-title {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.terminal-controls {
    display: flex;
    gap: 6px;
}

.terminal-controls span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-controls span:nth-child(1) { background: var(--danger); }
.terminal-controls span:nth-child(2) { background: var(--warning); }
.terminal-controls span:nth-child(3) { background: var(--success); }

.terminal-body {
    padding: 24px;
}

/* Action Buttons */
.action-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.btn {
    background: var(--accent);
    color: var(--bg);
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: var(--bg);
}

.btn-secondary {
    background: var(--muted);
    color: white;
}

/* Message Tree */
.message-tree {
    position: relative;
}

.entry {
    position: relative;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(17, 21, 28, 0.3);
    border-radius: 4px;
    border-left: 3px solid var(--muted);
    transition: all 0.3s;
}

.entry:hover {
    background: rgba(17, 21, 28, 0.6);
    border-left-color: var(--accent);
}

.entry.d0 { margin-left: 0; }
.entry.d1 { margin-left: 24px; }
.entry.d2 { margin-left: 48px; }
.entry.d3 { margin-left: 72px; }
.entry.d4 { margin-left: 96px; }

.entry-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.time {
    color: var(--muted);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.host { background: var(--host); color: var(--bg); }
.badge.friend { background: var(--friend); color: var(--bg); }
.badge.invited { background: var(--invited); color: var(--bg); }

.entry-content {
    margin-bottom: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.quote {
    color: var(--muted);
    font-style: italic;
    border-left: 2px solid var(--muted);
    padding-left: 12px;
    margin: 8px 0;
    display: block;
}

.entry-actions {
    display: flex;
    gap: 8px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.entry:hover .entry-actions {
    opacity: 1;
}

.entry-actions a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 3px;
    transition: background 0.3s;
}

.entry-actions a:hover {
    background: rgba(0, 255, 158, 0.1);
}

.entry-actions .delete {
    color: var(--danger);
}

.entry-actions .delete:hover {
    background: rgba(255, 95, 95, 0.1);
}

/* Statistics Panel */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--muted);
    border-radius: 6px;
    padding: 18px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Search and Filter */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--muted);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 0.85rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-select {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--muted);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 0.85rem;
}

/* Loading and Empty States */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--muted);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 12px;
    }

    header {
        padding: 16px 20px;
    }

    .entry.d1 { margin-left: 16px; }
    .entry.d2 { margin-left: 32px; }
    .entry.d3 { margin-left: 48px; }
    .entry.d4 { margin-left: 64px; }

    .action-bar {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }
}

/* Scanline Effect */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(rgba(255,255,255,.02) 50%, transparent 0);
    background-size: 2px 4px;
    mix-blend-mode: overlay;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--panel);
    border: 1px solid var(--accent);
    border-radius: 6px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--muted);
}

.modal-title {
    color: var(--accent);
    font-weight: 600;
    margin: 0;
}

.close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.close:hover {
    color: var(--accent);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--muted);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 0.85rem;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--muted);
    margin-top: 20px;
}

/* Public view specific */
.public-view .action-bar,
.public-view .stats-grid,
.public-view .entry-actions {
    display: none;
}

.public-view .entry:hover {
    background: rgba(17, 21, 28, 0.3);
    border-left-color: var(--muted);
}
/* Add to :root */
:root {
    /* Keep existing variables */
    --pulse: #00ff9e;
}

/* Conversation Separators */
.entry {
    position: relative;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(79, 102, 100, 0.3);
    transition: all 0.3s ease;
}

.entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.entry:hover {
    transform: translateY(-2px);
}

/* Participant Badges */
.badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

.badge:hover::after {
    opacity: 1;
}

/* Message Content Styling */
.entry-content {
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
    background: rgba(17, 21, 28, 0.4);
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid;
    transition: all 0.3s;
}

/* Soulful Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 158, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(0, 255, 158, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 158, 0); }
}

.entry:hover .entry-content {
    background: rgba(17, 21, 28, 0.6);
    transform: translateX(5px);
}

/* Timestamp Styling */
.time {
    background: rgba(17, 21, 28, 0.6);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Floating Icon Effect */
.entry-header {
    position: relative;
}

.entry-header .icon-float {
    position: absolute;
    top: -15px;
    right: -10px;
    opacity: 0.1;
    font-size: 2rem;
    transition: all 0.5s ease;
    z-index: 0;
}

.entry:hover .icon-float {
    opacity: 0.15;
    transform: translateY(-5px);
}