:root {
    --bg-dark: #07090e;
    --bg-card: rgba(15, 19, 32, 0.75);
    --bg-card-hover: rgba(22, 28, 48, 0.88);
    --bg-surface: rgba(10, 13, 22, 0.6);
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --neon-blue: #00f0ff;
    --neon-green: #39ff14;
    --neon-red: #ff0055;
    --neon-purple: #b026ff;
    --neon-pink: #ff007f;
    --neon-yellow: #fcee0a;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.25);
    --border-card: rgba(0, 240, 255, 0.15);
    --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
    
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Roboto Mono', 'JetBrains Mono', monospace;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
}

.hidden {
    display: none !important;
}

/* --- APP WRAPPER --- */
#app-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.99); }
    to { opacity: 1; transform: scale(1); }
}

.view {
    padding: 1.25rem 2rem;
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

#host-view {
    display: grid;
    grid-template-columns: 410px 1fr;
    grid-template-rows: minmax(0, 1fr);
    gap: 1.5rem;
    height: 100%;
    overflow: hidden;
    min-height: 0;
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 2rem;
    background: rgba(7, 9, 14, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-brand {
    color: #fff;
}
.logo-accent {
    color: var(--neon-blue);
    text-shadow: 0 0 12px var(--neon-blue);
}

.badge-version {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--neon-blue);
    border-radius: var(--radius-sm);
    letter-spacing: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-btn {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.25s ease;
    position: relative;
}

.header-btn:hover {
    color: var(--neon-blue);
    border-color: var(--neon-blue);
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    transform: translateY(-1px);
}

.header-btn svg {
    width: 18px;
    height: 18px;
}

.header-btn.active {
    color: var(--neon-green);
    border-color: var(--neon-green);
    background: rgba(57, 255, 20, 0.12);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

/* Status Pill */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-dot.offline {
    background: var(--text-muted);
    box-shadow: none;
}

.status-dot.online {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green);
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* --- CARDS & GLASS PANELS --- */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow-y: auto;
    min-height: 0;
    max-height: 100%;
    padding-bottom: 1rem;
    padding-right: 0.5rem;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.card:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 25px var(--border-glow), var(--glass-shadow);
}

.card h2 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 0.85rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- QR SECTION --- */
.connection-card {
    position: relative;
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 160px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Cyber Scanning Line */
.qr-container::after {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    box-shadow: 0 0 12px var(--neon-blue);
    animation: qrScan 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes qrScan {
    0% { top: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.qr-placeholder {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-align: center;
}

#qrcode {
    padding: 6px;
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrcode img, #qrcode canvas {
    display: block;
}

.join-info {
    text-align: center;
}

.join-url-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    background: rgba(0, 0, 0, 0.55);
    padding: 0.45rem 0.65rem 0.45rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 0.6rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.join-url-box:hover, .join-url-box:focus-within {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.join-url {
    font-family: var(--font-mono);
    color: var(--neon-blue);
    font-size: 0.78rem;
    margin: 0;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    user-select: all;
    flex: 1;
    min-width: 0;
}

.join-url::-webkit-scrollbar {
    display: none;
}

.btn-copy-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid var(--neon-blue);
    border-radius: var(--radius-sm);
    color: var(--neon-blue);
    padding: 0.45rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.btn-copy-action svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.btn-copy-action:hover {
    background: rgba(0, 240, 255, 0.25);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
    transform: translateY(-1px);
}

.btn-copy-action:active {
    transform: translateY(0);
}

.btn-copy-action.copied {
    background: rgba(57, 255, 20, 0.2) !important;
    border-color: var(--neon-green) !important;
    color: var(--neon-green) !important;
    box-shadow: 0 0 16px rgba(57, 255, 20, 0.4) !important;
}

.join-instruction {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* --- ACTION BUTTONS & TOOLBAR --- */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    width: 100%;
    box-sizing: border-box;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.75rem;
    font-size: 0.73rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-transform: uppercase;
}

.action-btn span {
    display: block;
    min-width: 0;
    flex: 1;
    white-space: normal;
    text-align: left;
}

.action-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--border-glow);
    transform: translateY(-2px);
    color: #fff;
}

.action-btn:active {
    transform: translateY(0);
}

.btn-share-action:hover {
    background: rgba(0, 240, 255, 0.2) !important;
    border-color: #38ef7d !important;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.45) !important;
    color: #fff !important;
}

.hidden-input {
    display: none !important;
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* --- FILE EXPLORER --- */
.explorer-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.explorer-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.explorer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.explorer-title {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
}

.explorer-tools {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumbs {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-blue);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.crumb {
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.crumb:hover {
    color: #fff;
    background: rgba(0, 240, 255, 0.15);
    text-shadow: 0 0 10px var(--neon-blue);
}

.crumb-separator {
    color: var(--text-dim);
    font-size: 0.7rem;
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.85rem;
    overflow-y: auto;
    flex: 1;
    align-content: start;
    padding-right: 0.4rem;
}

.file-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 0.6rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    transform: translateY(-3px);
}

.file-item.selected {
    border-color: var(--neon-blue);
    background: rgba(0, 240, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.file-item.folder {
    border-color: rgba(57, 255, 20, 0.15);
}
.file-item.folder:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.25);
}

.item-icon {
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.file-item:hover .item-icon {
    transform: scale(1.08);
}

.folder-icon { color: var(--neon-green); }
.file-icon { color: var(--neon-blue); }

.item-thumbnail {
    width: 44px;
    height: 44px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.file-item:hover .item-thumbnail {
    transform: scale(1.08);
    border-color: var(--neon-blue);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.item-name {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-main);
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.item-meta {
    font-size: 0.68rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* List View */
.file-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.file-grid.list-view .file-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 0.6rem 1rem;
    gap: 1rem;
}

.file-grid.list-view .item-icon {
    width: 24px;
    height: 24px;
}

.file-grid.list-view .item-thumbnail {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.file-grid.list-view .item-name {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    -webkit-line-clamp: unset;
    text-overflow: ellipsis;
}

.file-grid.list-view .item-meta {
    margin-left: auto;
}

/* Custom Inputs & Buttons */
.custom-input {
    width: 100%;
    padding: 0.65rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.25s ease;
}

.custom-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
    background: rgba(0, 0, 0, 0.7);
}

.custom-btn {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.3));
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.custom-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0.4));
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px var(--border-glow);
}

.custom-btn:active {
    transform: translateY(0);
}

/* Search Container */
.search-container {
    position: relative;
    display: inline-block;
}

.search-input {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
    width: 220px !important;
}

/* --- MODALS --- */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 7, 12, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.1);
    max-width: 440px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-content h2, .modal-content h3 {
    letter-spacing: 1.5px;
    font-weight: 700;
}

/* --- ICON BUTTONS & MODAL CLOSE BUTTONS --- */
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all var(--transition-fast);
    outline: none;
    flex-shrink: 0;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    display: block;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-close-modal {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    box-sizing: border-box;
    padding: 0;
}

.btn-close-modal:hover {
    color: #fff !important;
    background: rgba(255, 51, 102, 0.2) !important;
    border-color: var(--neon-red) !important;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.5) !important;
    transform: scale(1.08);
}

.btn-close-modal:active {
    transform: scale(0.95);
}

.btn-close-modal svg {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
    pointer-events: none;
}

/* --- CUSTOM CYBER DIALOG SYSTEM (Replacing native alerts/prompts/confirms) --- */
#cyber-dialog-modal {
    z-index: 10050;
}

.cyber-dialog-card {
    border-color: var(--neon-blue);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.25), 0 25px 50px rgba(0, 0, 0, 0.9);
}

.cyber-dialog-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.cyber-dialog-icon.danger {
    background: rgba(255, 0, 85, 0.1);
    border-color: var(--neon-red);
    color: var(--neon-red);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.3);
}

.cyber-dialog-icon.success {
    background: rgba(57, 255, 20, 0.1);
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.cyber-dialog-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

/* --- DYNAMIC SPLASH SCREEN & BOOT SEQUENCE --- */
#boot-sequence {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, #0a0e1a 0%, #030407 100%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 2rem;
    align-items: center;
    color: #fff;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

#boot-sequence.inactive {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

.hat-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    opacity: 0.45; /* Much more visible */
}

.floating-hat {
    width: 140vmin; /* Extremely massive */
    max-width: none;
    height: auto;
    animation: floatHat 8s ease-in-out infinite, glitchHat 5s infinite;
    filter: invert(1) drop-shadow(0 0 40px rgba(0, 240, 255, 0.5));
    mix-blend-mode: screen;
}

@keyframes floatHat {
    0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); filter: invert(1) drop-shadow(0 0 30px rgba(0, 240, 255, 0.4)); }
    50% { transform: translateY(-40px) rotate(3deg) scale(1.05); filter: invert(1) drop-shadow(0 0 50px rgba(0, 240, 255, 0.8)); }
}

@keyframes glitchHat {
    0%, 96%, 100% { clip-path: inset(0 0 0 0); }
    97% { clip-path: inset(20% 0 80% 0); }
    98% { clip-path: inset(80% 0 20% 0); filter: invert(1) hue-rotate(90deg); }
    99% { clip-path: inset(40% 0 60% 0); }
}

.flying-files-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: 1;
    perspective: 1000px;
}

.flying-file {
    position: absolute;
    width: 40px;
    height: 50px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    opacity: 0;
    animation: flyTowardScreen linear infinite;
}

.flying-file::before {
    content: '';
    position: absolute;
    top: 10px; left: 8px; right: 8px; height: 2px;
    background: rgba(0, 240, 255, 0.4);
    box-shadow: 0 6px 0 rgba(0, 240, 255, 0.4), 0 12px 0 rgba(0, 240, 255, 0.4);
}

@keyframes flyTowardScreen {
    0% {
        transform: translate3d(var(--startX), var(--startY), -1000px) rotateX(var(--rotX)) rotateY(var(--rotY));
        opacity: 0;
    }
    10% { opacity: 0.8; }
    100% {
        transform: translate3d(var(--endX), var(--endY), 500px) rotateX(calc(var(--rotX) * 2)) rotateY(calc(var(--rotY) * 2));
        opacity: 0;
    }
}


.splash-logo-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.9);
    animation: wrapperComeUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.5s;
}

@keyframes wrapperComeUp {
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.splash-logo {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: 12px;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

@media (max-width: 600px) {
    .splash-logo {
        font-size: 2.5rem;
    }
}

.glitch-title {
    position: relative;
    animation: textGlitch 3s infinite 1.5s;
}

.glitch-title::before, .glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.8;
}

.glitch-title::before {
    color: var(--neon-blue);
    z-index: -1;
    animation: glitchAnim1 3s infinite linear alternate-reverse;
}

.glitch-title::after {
    color: var(--neon-pink);
    z-index: -2;
    animation: glitchAnim2 2s infinite linear alternate-reverse;
}

@keyframes textGlitch {
    0%, 96%, 100% { transform: translate(0, 0); }
    97% { transform: translate(-3px, 2px) skewX(5deg); }
    98% { transform: translate(3px, -2px) skewX(-5deg); filter: invert(1); }
    99% { transform: translate(0, 0) skewX(2deg); filter: hue-rotate(90deg); }
}

@keyframes glitchAnim1 {
    0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    40% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
    100% { clip-path: inset(30% 0 40% 0); transform: translate(1px, -1px); }
}

@keyframes glitchAnim2 {
    0% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -1px); }
    20% { clip-path: inset(80% 0 5% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(30% 0 40% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(60% 0 10% 0); transform: translate(-1px, 1px); }
    80% { clip-path: inset(20% 0 80% 0); transform: translate(1px, -1px); }
    100% { clip-path: inset(50% 0 30% 0); transform: translate(-2px, 1px); }
}

/* Boot Terminal Log Container */
.boot-terminal {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 520px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.1);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--neon-blue);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    line-height: 1.5;
    text-align: left;
    margin-bottom: 1.5rem;
}

.boot-line {
    opacity: 0;
    animation: lineFadeIn 0.3s forwards;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.boot-line.success {
    color: var(--neon-green);
}

.boot-line.accent {
    color: var(--neon-purple);
}

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

.boot-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--neon-blue);
    vertical-align: middle;
    margin-left: 4px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.boot-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-boot {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.2s ease;
}

.btn-boot:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px var(--neon-blue);
}

/* --- CONTEXT MENU --- */
.context-menu {
    position: fixed;
    background: rgba(12, 16, 28, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 0.4rem 0;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 240, 255, 0.15);
    min-width: 170px;
}

.context-item, .context-menu-item {
    padding: 0.55rem 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.82rem;
    color: var(--text-main);
    transition: all 0.15s ease;
}

.context-item:hover, .context-menu-item:hover {
    background: rgba(0, 240, 255, 0.12);
    color: #fff;
}

.context-item svg {
    width: 15px;
    height: 15px;
    opacity: 0.85;
}

/* --- CHAT SIDEBAR --- */
.chat-sidebar {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 320px;
    max-width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
    border-left: 1px solid var(--border-color);
    z-index: 4000;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-sidebar.hidden {
    transform: translateX(100%);
    display: flex !important;
}

.chat-header {
    padding: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    color: var(--neon-blue);
    font-size: 0.95rem;
    font-family: var(--font-mono);
    letter-spacing: 2px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chat-msg {
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    max-width: 85%;
    word-break: break-word;
    line-height: 1.4;
}

.chat-msg.system {
    align-self: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    text-align: center;
    border-radius: var(--radius-full);
}

.chat-msg.self {
    align-self: flex-end;
    background: var(--neon-blue);
    color: #000;
    font-weight: 500;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

.chat-msg.other {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
}

.chat-msg .sender {
    font-weight: 800;
    font-size: 0.68rem;
    margin-bottom: 0.2rem;
    opacity: 0.8;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

/* Chat Badge */
.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--neon-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-red);
    animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(10, 14, 24, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--neon-green);
    color: var(--text-main);
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.25);
    animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.3s, transform 0.3s;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

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

/* Transfer Dashboard */
#transfer-dashboard {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 360px;
    background: rgba(10, 14, 24, 0.95);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    z-index: 9000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-mono);
}

.transfer-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.transfer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
}

.transfer-progress-bg {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.transfer-progress-fill {
    height: 100%;
    background: var(--neon-blue);
    width: 0%;
    transition: width 0.15s linear;
    box-shadow: 0 0 8px var(--neon-blue);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    transition: 0.3s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}
input:checked + .slider {
    background-color: var(--neon-blue);
    box-shadow: 0 0 12px var(--neon-blue);
}
input:checked + .slider:before {
    transform: translateX(24px);
}

/* Radar Sweep */
@keyframes radarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.radar-sweep {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: conic-gradient(from 0deg, rgba(57, 255, 20, 0) 70%, rgba(57, 255, 20, 0.35) 100%);
    border-radius: 50%;
    animation: radarSweep 2s linear infinite;
    pointer-events: none;
}

/* Glitch Title Animation */
@keyframes glitch-anim {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 1px) }
    40% { transform: translate(-1px, -1px) }
    60% { transform: translate(2px, 1px) }
    80% { transform: translate(1px, -1px) }
    100% { transform: translate(0) }
}

.glitch-title {
    position: relative;
    display: inline-block;
    animation: glitch-anim 3s infinite;
    animation-play-state: paused;
}

/* Responsive Overrides */
@media (max-width: 1100px) {
    .view {
        overflow-y: auto;
    }
    #host-view {
        display: flex;
        flex-direction: column;
        overflow-y: visible;
        height: auto;
    }
    .cards-container { 
        display: grid;
        grid-template-columns: 1fr 1fr;
        overflow-y: visible;
        max-height: none;
        flex-shrink: 0;
    }
    .explorer-section {
        height: auto;
        min-height: 500px;
        flex-shrink: 0;
    }
}
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .header-actions {
        gap: 0.35rem;
        flex-wrap: wrap;
    }
    .header-btn {
        width: 34px;
        height: 34px;
    }
    #btn-info span {
        display: none;
    }
    #btn-info {
        padding: 0.35rem 0.5rem;
    }
    .logo {
        font-size: 1.15rem;
    }
    .badge-version {
        font-size: 0.6rem;
        padding: 0.1rem 0.35rem;
    }
}

@media (max-width: 600px) {
    header {
        padding: 0.4rem 0.6rem;
    }
    .view {
        padding: 0.6rem 0.4rem;
        -webkit-overflow-scrolling: touch;
    }
    .cards-container { 
        grid-template-columns: 1fr;
        gap: 0.75rem;
        -webkit-overflow-scrolling: touch;
    }
    .card {
        padding: 1rem 0.85rem;
    }
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    .file-item {
        padding: 0.7rem 0.4rem;
        touch-action: manipulation;
    }
    .file-item .item-icon {
        width: 36px;
        height: 36px;
    }
    .file-item .item-name {
        font-size: 0.72rem;
    }
    .modal {
        padding: 0.75rem;
    }
    .modal-content {
        padding: 1.25rem 1rem;
        width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .action-buttons {
        gap: 0.5rem;
    }
    .custom-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        touch-action: manipulation;
    }
    .transfer-header {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .swarm-telemetry-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}

* {
    -webkit-tap-highlight-color: transparent;
}
button, .file-item, .custom-btn, .header-btn {
    touch-action: manipulation;
}

/* ==========================================================================
   BURNED SCREEN / DESTROYED TAKEOVER STYLES
   ========================================================================== */
.burned-screen-wrapper {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1f0610 0%, #0c0914 60%, #05060a 100%);
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    box-sizing: border-box;
    z-index: 9999999;
    font-family: var(--font-ui);
    overflow: hidden;
    animation: fadeIn 0.35s ease-out forwards;
}

.burned-screen-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 0, 85, 0.04) 0px,
        rgba(255, 0, 85, 0.04) 1px,
        transparent 1px,
        transparent 4px
    );
    z-index: 1;
}

.burned-icon-container {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255, 0, 85, 0.12);
    border: 2px solid #ff0055;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 35px rgba(255, 0, 85, 0.5), inset 0 0 15px rgba(255, 0, 85, 0.3);
    animation: statusPulse 1.5s infinite;
}

.burned-badge {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: #ff0055;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    background: rgba(255, 0, 85, 0.1);
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 0, 85, 0.3);
    box-shadow: 0 0 12px rgba(255, 0, 85, 0.2);
}

.burned-title {
    font-family: var(--font-mono);
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 900;
    letter-spacing: 1px;
    color: #ffffff;
    margin: 0 0 1.25rem 0;
    text-shadow: 0 0 35px rgba(255, 0, 85, 0.8), 0 0 10px rgba(255, 0, 85, 0.5);
    line-height: 1.1;
}

.burned-desc {
    max-width: 580px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: #94a3b8;
    margin: 0 0 2rem 0;
    text-align: center;
}

.burned-stats-bar {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.25rem;
    padding: 0.85rem 1.5rem;
    background: rgba(15, 19, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #64748b;
}

.burned-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: linear-gradient(135deg, #ff0055, #b026ff);
    border: none;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 0.9rem 2.2rem;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.45);
    transition: all 0.2s ease;
}

.burned-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(255, 0, 85, 0.7);
}

/* ==========================================================================
   E2EE (ECDH + AES-GCM) & SWARM TORRENT STYLES
   ========================================================================== */
.e2ee-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--neon-blue);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
    transition: all 0.3s ease;
}

.e2ee-indicator.active {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(57, 255, 20, 0.08);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.25);
    animation: statusPulse 2.5s infinite;
}

.transfer-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.swarm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: rgba(176, 38, 255, 0.18);
    border: 1px solid rgba(176, 38, 255, 0.5);
    color: #e09aff;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(176, 38, 255, 0.3);
    animation: swarmBadgeGlow 2s infinite alternate;
}

@keyframes swarmBadgeGlow {
    from { box-shadow: 0 0 6px rgba(176, 38, 255, 0.2); }
    to { box-shadow: 0 0 14px rgba(176, 38, 255, 0.6); }
}

.swarm-badge svg {
    width: 10px;
    height: 10px;
    stroke: #00f0ff;
    fill: #00f0ff;
}

.swarm-telemetry-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    padding: 0 0.1rem;
    margin-top: 0.15rem;
}

.swarm-stat-sources {
    color: #00f0ff;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.swarm-stat-eta {
    color: var(--text-muted);
}

.swarm-matrix-track {
    display: flex;
    gap: 2px;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    padding: 1px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
}

.swarm-chunk-cell {
    flex: 1;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1px;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.swarm-chunk-cell.completed {
    background: #00f0ff;
    box-shadow: 0 0 4px #00f0ff;
}

.swarm-chunk-cell.inflight {
    background: #fcee0a;
    box-shadow: 0 0 4px #fcee0a;
    animation: inflightPulse 0.6s infinite alternate;
}

@keyframes inflightPulse {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.transfer-item.swarm {
    border-color: rgba(176, 38, 255, 0.45);
    background: linear-gradient(135deg, rgba(25, 12, 45, 0.7), rgba(10, 22, 40, 0.7));
    box-shadow: 0 0 16px rgba(176, 38, 255, 0.2);
}

.transfer-item.swarm .transfer-progress-fill {
    background: linear-gradient(90deg, #b026ff, #00f0ff, #39ff14);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.stream-buffer-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.stream-buffer-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
    border-radius: 3px;
    transition: width 0.25s ease-out;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.resuming-badge {
    color: var(--neon-yellow);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.1rem 0.4rem;
    border: 1px solid rgba(252, 238, 10, 0.3);
    border-radius: 3px;
    background: rgba(252, 238, 10, 0.1);
}


