/* Dark Neo-Fintech Theme */
:root {
    --bg-color: #050505;
    --glass-surface: rgba(10, 10, 20, 0.6);
    --glass-border: rgba(0, 242, 234, 0.2);
    --glass-highlight: rgba(0, 242, 234, 0.1);

    --primary-accent: #00f2ea;
    --secondary-accent: #7000ff;
    --error-color: #ff3b3b;
    --success-color: #00ff9d;

    --text-main: #ffffff;
    --text-muted: #8892b0;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --card-radius: 16px;
    --btn-radius: 8px;

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-shadow: 0 0 20px rgba(0, 242, 234, 0.15);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    background-image:
        linear-gradient(rgba(0, 242, 234, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 234, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Glow */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(112, 0, 255, 0.05) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.5px;
}

header {
    text-align: center;
    margin-bottom: 60px;
    animation: slideDown 0.8s ease-out;
}

header h1 {
    font-size: 4rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    letter-spacing: -2px;
    text-transform: uppercase;
    filter: drop-shadow(0 0 10px rgba(0, 242, 234, 0.3));
}

header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Glass Components */
.upload-section,
.results,
.modal-content {
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.upload-section:hover {
    border-color: var(--primary-accent);
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.1);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 80px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-accent);
    background: rgba(0, 242, 234, 0.02);
}

.upload-content svg {
    color: var(--primary-accent);
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 15px var(--primary-accent));
}

.upload-link {
    color: var(--primary-accent);
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons */
.btn-primary {
    background: transparent;
    color: var(--primary-accent);
    font-weight: 700;
    padding: 16px 40px;
    border: 2px solid var(--primary-accent);
    border-radius: var(--btn-radius);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.1);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-accent);
    color: #000;
    box-shadow: 0 0 40px rgba(0, 242, 234, 0.4);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 10px 24px;
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
    color: var(--text-main);
}

.btn-judge-mode {
    background: rgba(255, 166, 0, 0.1);
    color: #ffa600;
    font-weight: 700;
    padding: 16px 30px;
    border: 2px solid #ffa600;
    border-radius: var(--btn-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 15px rgba(255, 166, 0, 0.1);
}

.btn-judge-mode:hover {
    background: #ffa600;
    color: #000;
    box-shadow: 0 0 40px rgba(255, 166, 0, 0.4);
    transform: translateY(-2px);
}

/* Loader */
.loader {
    text-align: center;
    padding: 40px;
    margin-top: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 242, 234, 0.1);
    border-top: 4px solid var(--primary-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.2);
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Results Section */
.results {
    margin-top: 60px;
    animation: slideUp 0.6s ease-out;
}

.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.summary-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-accent), transparent);
}

.summary-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-accent);
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.1);
}

.summary-card h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.summary-card span {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Charts */
.charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.chart-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--glass-border);
    position: relative;
    min-height: 400px;
}

.chart-container::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 16px;
    background: linear-gradient(45deg, var(--glass-border), transparent 40%);
    z-index: -1;
    pointer-events: none;
}

/* Table */
.table-section {
    margin-top: 60px;
}

.table-container {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(0, 242, 234, 0.05);
    padding: 20px;
    text-align: left;
    color: var(--primary-accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    color: #fff;
    background: rgba(0, 242, 234, 0.02);
}

tr.anomalous td {
    background: rgba(255, 59, 59, 0.05);
    color: #ff8888;
}

tr.anomalous td:first-child {
    border-left: 4px solid var(--error-color);
}

tr.anomalous:hover td {
    background: rgba(255, 59, 59, 0.1);
}

/* Inputs */
.search-input,
.sort-select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
    min-width: 250px;
}

.search-input:focus,
.sort-select:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.1);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Bar */
.progress-bar {
    background: rgba(255, 255, 255, 0.05);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-accent);
    box-shadow: 0 0 15px var(--primary-accent);
}

/* Modal */
.modal {
    display: none;
    /* Changed from flex to none by default, JS will show it */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    background: #0a0b1e;
    border: 1px solid var(--primary-accent);
    box-shadow: 0 0 50px rgba(0, 242, 234, 0.2);
    padding: 0;
    overflow: hidden;
    width: 90%;
    max-width: 700px;
    margin: 20px auto;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    /* Ensure it fits on screen */
}

/* New Persistent Header */
.modal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 11, 30, 0.95);
    backdrop-filter: blur(15px);
    padding: 20px 40px;
    border-bottom: 1px solid rgba(0, 242, 234, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

.modal-inner-body {
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-accent) transparent;
}

.close {
    order: 2;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: -10px;
}

.close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg) scale(1.1);
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 40px;
    background: rgba(0, 242, 234, 0.02);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-item span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.text-danger {
    color: var(--error-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.9rem !important;
    font-weight: 700;
    letter-spacing: 1px;
}

.status-anomalous {
    background: rgba(255, 59, 59, 0.1);
    color: var(--error-color) !important;
    border: 1px solid var(--error-color);
}

.status-normal {
    background: rgba(0, 255, 157, 0.1);
    color: var(--success-color) !important;
    border: 1px solid var(--success-color);
}

/* Agent Section */
.agent-section {
    padding: 30px 40px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
}

.btn-agent {
    background: transparent;
    border: 1px solid var(--secondary-accent);
    color: var(--secondary-accent);
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.btn-agent:hover {
    background: var(--secondary-accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.4);
}

.btn-agent:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.agent-response {
    margin-top: 20px;
    background: rgba(112, 0, 255, 0.05);
    border: 1px solid var(--secondary-accent);
    border-radius: 8px;
    padding: 20px;
    min-height: 80px;
    position: relative;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--secondary-accent);
    border-radius: 50%;
    margin-right: 5px;
    animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.response-text {
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.response-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .charts {
        grid-template-columns: 1fr;
    }

    .upload-section,
    .results {
        padding: 20px;
    }

    .btn-primary {
        width: 100%;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}

/* User Profile Modal Styles */
.user-profile-content {
    background: #0a0b1e;
    border: 1px solid var(--primary-accent);
    box-shadow: 0 0 50px rgba(0, 242, 234, 0.2);
    max-width: 600px;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.profile-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 25px 30px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 11, 30, 0.98);
    backdrop-filter: blur(15px);
}

.profile-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary-accent);
}

.risk-badge .badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge.high-risk {
    background: rgba(255, 59, 59, 0.2);
    color: #ff3b3b;
    border: 1px solid #ff3b3b;
    box-shadow: 0 0 15px rgba(255, 59, 59, 0.3);
}

.badge.medium-risk {
    background: rgba(255, 166, 0, 0.2);
    color: #ffa600;
    border: 1px solid #ffa600;
}

.badge.low-risk {
    background: rgba(0, 255, 157, 0.2);
    color: #00ff9d;
    border: 1px solid #00ff9d;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 30px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    text-align: center;
}

.stat-box label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-box .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.history-list {
    padding: 0 30px 30px;
    max-height: 300px;
    overflow-y: auto;
}

.history-list h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-item {
    background: rgba(255, 59, 59, 0.05);
    border-left: 3px solid var(--error-color);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.history-id {
    font-family: monospace;
    color: var(--text-muted);
}

.history-amount {
    font-weight: 700;
    color: #fff;
}

.history-reason {
    font-size: 0.9rem;
    color: #ff8888;
}

.clean-record {
    text-align: center;
    padding: 30px;
    color: var(--success-color);
    font-style: italic;
    background: rgba(0, 255, 157, 0.05);
    margin: 0 30px 30px;
    border-radius: 8px;
    border: 1px dashed var(--success-color);
}

.loader-small {
    text-align: center;
    padding: 40px;
    color: var(--primary-accent);
    font-style: italic;
}

.close-profile {
    order: 3;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: -10px;
    line-height: 1;
}

.close-profile:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg) scale(1.1);
}

/* Requirements Button */
.btn-secondary-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.btn-secondary-outline:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.2);
}

/* Requirements List */
.requirements-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.requirements-list li {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
}

.requirements-list code {
    background: rgba(0, 242, 234, 0.1);
    color: var(--neon-cyan);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Ultra-Premium Cyber HUD Loader --- */
.initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    /* Deep void black */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cyber-hud {
    position: relative;
    width: 600px;
    /* Wider HUD */
    height: 300px;
    display: flex;
    flex-direction: row;
    /* Side-by-side: Ring | Text */
    align-items: center;
    justify-content: center;
    gap: 40px;
    background: radial-gradient(circle at center, rgba(0, 242, 234, 0.05), transparent 70%);
}

/* 1. The Spinning Reactor Ring */
.cyber-spinner-container {
    position: relative;
    width: 100px;
    height: 100px;
}

.cyber-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-accent);
    border-right: 3px solid var(--primary-accent);
    border-radius: 50%;
    animation: cyber-spin 1s linear infinite;
    box-shadow: 0 0 20px var(--primary-accent);
}

.cyber-spinner-ring::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 2px solid transparent;
    border-bottom: 2px solid var(--secondary-accent);
    border-left: 2px solid var(--secondary-accent);
    border-radius: 50%;
    animation: cyber-spin-rev 1.5s linear infinite;
}

.cyber-spinner-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--primary-accent);
    border-radius: 50%;
    opacity: 0.2;
    animation: cyber-pulse 1s ease-in-out infinite alternate;
}

@keyframes cyber-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes cyber-spin-rev {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes cyber-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.2;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
        box-shadow: 0 0 30px var(--primary-accent);
    }
}

/* 2. The Hacker Text */
.cyber-text-container {
    font-family: 'Courier New', monospace;
    color: var(--primary-accent);
    width: 350px;
    text-align: left;
}

.cyber-text {
    font-size: 1.1rem;
    line-height: 1.6;
    text-shadow: 0 0 5px var(--primary-accent);
    white-space: pre-wrap;
    /* Preserve newlines from js */
}

.cyber-cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--primary-accent);
    animation: blink 0.8s steps(2, start) infinite;
    margin-left: 5px;
    vertical-align: middle;
}

/* 3. The Scanner Line overlay */
.cyber-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 242, 234, 0.1), transparent);
    animation: cyber-scan 3s linear infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes cyber-scan {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

.terminal-line {
    margin: 5px 0;
    line-height: 1.4;
}

.terminal-line.error {
    color: #ff3b3b;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 59, 59, 0.5);
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* --- Cyber Glass Modals --- */
.cyber-modal-content {
    background: rgba(10, 11, 30, 0.95);
    border: 1px solid var(--primary-accent);
    box-shadow: 0 0 40px rgba(0, 242, 234, 0.15);
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 650px;
    overflow: hidden;
    position: relative;
    /* Animated Border Glow */
    animation: modal-glow 4s infinite alternate;
}

@keyframes modal-glow {
    0% {
        box-shadow: 0 0 20px rgba(0, 242, 234, 0.1);
    }

    100% {
        box-shadow: 0 0 40px rgba(0, 242, 234, 0.3);
    }
}

.cyber-modal-content.error-mode {
    border-color: var(--error-color);
    animation: error-glow 2s infinite alternate;
}

@keyframes error-glow {
    0% {
        box-shadow: 0 0 20px rgba(255, 59, 59, 0.1);
    }

    100% {
        box-shadow: 0 0 40px rgba(255, 59, 59, 0.3);
    }
}


.cyber-modal-header {
    background: rgba(0, 242, 234, 0.05);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 242, 234, 0.2);
}

.cyber-modal-header h3 {
    margin: 0;
    color: var(--primary-accent);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.error-mode .cyber-modal-header {
    background: rgba(255, 59, 59, 0.05);
    border-bottom-color: rgba(255, 59, 59, 0.2);
}

.cyber-modal-body {
    padding: 30px;
}

/* Instructions & Lists */
.cyber-instruction {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.cyber-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.cyber-list li {
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 5px;
}

.cyber-list li:last-child {
    border-bottom: none;
}

.cyber-list li span {
    color: var(--primary-accent);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.cyber-list li small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Error Log */
.cyber-error-log {
    background: #000;
    border: 1px solid var(--error-color);
    padding: 15px;
    border-radius: 6px;
    color: #ff8888;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    max-height: 200px;
    overflow-y: auto;
}

/* Buttons */
.btn-primary-small {
    background: transparent;
    border: 1px solid var(--primary-accent);
    color: var(--primary-accent);
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-primary-small:hover {
    background: var(--primary-accent);
    color: #000;
    box-shadow: 0 0 15px var(--primary-accent);
}

.btn-error-small {
    background: transparent;
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-error-small:hover {
    background: var(--error-color);
    color: #000;
    box-shadow: 0 0 15px var(--error-color);
}

.cyber-close {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.cyber-close:hover {
    color: #fff;
}

.btn-terminal:hover {
    background: #444;
    border-color: #777;
}

#terminalErrorList {
    margin-left: 20px;
    color: #ff3b3b;
}

/* Terminal Requirements List */
.terminal-list {
    list-style: none;
    padding: 0 0 0 20px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    color: #00ff00;
}

.terminal-list li {
    margin-bottom: 5px;
}

.terminal-list .comment {
    color: #666;
    margin-left: 10px;
    font-style: italic;
}

/* Chart Canvas Fix */
.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 400px;
}

/* Terminal Loader Styles */
.terminal-loader {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.1);
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red {
    background: #ff5f56;
}

.terminal-dot.yellow {
    background: #ffbd2e;
}

.terminal-dot.green {
    background: #27c93f;
}

.terminal-title {
    margin-left: 10px;
    color: #888;
    font-size: 12px;
}

.terminal-body {
    padding: 20px;
    color: #00f2ea;
    font-size: 14px;
    line-height: 1.6;
    min-height: 150px;
}

.terminal-text {
    white-space: pre-wrap;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: #00f2ea;
    animation: blink 1s infinite;
    vertical-align: middle;
    margin-left: 5px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Initial Page Loader */
.initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

.initial-loader .terminal-window {
    width: 90%;
    max-width: 600px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.2);
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

.terminal-loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(0, 242, 234, 0.08), transparent 60%),
        rgba(3, 5, 15, 0.96);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.terminal-loader-window {
    width: 90%;
    max-width: 600px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.2);
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

.terminal-loader-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.8rem;
    color: #666;
}

.terminal-loader-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-loader-header .dot.red {
    background: #ff5f56;
}

.terminal-loader-header .dot.yellow {
    background: #ffbd2e;
}

.terminal-loader-header .dot.green {
    background: #27c93f;
}

.terminal-loader-header .title {
    margin-left: 10px;
    color: #888;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    opacity: 1;
}


.terminal-loader-body {
    position: relative;
    padding: 20px;
    background: radial-gradient(circle at top, rgba(0, 242, 234, 0.08), transparent 55%);
    overflow-y: auto;
    text-align: left;
    max-height: 300px;
}

/* Scanline bar */
.scanline-bar {
    position: absolute;
    top: -20%;
    left: 0;
    right: 0;
    height: 55px;
    background: linear-gradient(to bottom,
            rgba(0, 242, 234, 0) 0%,
            rgba(0, 242, 234, 0.15) 50%,
            rgba(0, 242, 234, 0) 100%);
    mix-blend-mode: screen;
    pointer-events: none;
    animation: scanline-move 2.2s linear infinite;
}

@keyframes scanline-move {
    0% {
        transform: translateY(-60%);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    50% {
        transform: translateY(140%);
        opacity: 1;
    }

    100% {
        transform: translateY(220%);
        opacity: 0;
    }
}

/* --- Small Cyber HUD (Analysis Loader) --- */
.cyber-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    /* Centering */
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 16px;
    /* Match container */
}

.cyber-hud-small {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 242, 234, 0.05);
    padding: 20px 40px;
    border-radius: 12px;
    border: 1px solid rgba(0, 242, 234, 0.2);
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.1);
}

.cyber-spinner-small {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-accent);
    border-right: 2px solid var(--primary-accent);
    border-radius: 50%;
    animation: cyber-spin 0.8s linear infinite;
}

.cyber-text-container-small {
    text-align: left;
}

.cyber-text-small {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-accent);
    text-shadow: 0 0 5px var(--primary-accent);
    white-space: pre-wrap;
}

.terminal-loader-text {
    position: relative;
    margin: 0;
    color: #e5e7eb;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    display: inline;
}

/* Subtle CRT effect */
.terminal-loader-text::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0px,
            rgba(0, 0, 0, 0.3) 1px);
    background-size: 100% 2px;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

/* Flashing Red Overlay */
@keyframes flash-red {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 0.8;
        background: rgba(255, 0, 0, 0.2);
    }
}

.flash-active {
    animation: flash-red 0.5s ease-in-out 3;
    border: 2px solid red !important;
}

/* Pipeline Flow Animation */
@keyframes flow {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

/* Bank Alert */
.bank-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    animation: slideInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 5px solid #ff3b3b;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

.bank-alert-header {
    background: #ff3b3b;
    color: white;
    padding: 8px 15px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bank-alert-body {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.bank-icon {
    font-size: 2rem;
    background: #fff0f0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bank-text strong {
    display: block;
    color: #333;
    font-size: 1rem;
    margin-bottom: 3px;
}

.bank-text p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.3;
}

/* Control Panel Buttons */
#btnSwitchDevice:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: #fff;
}

#btnChangeLocation:hover {
    background: rgba(0, 242, 234, 0.15);
    color: #00f2ea;
    border-color: #00f2ea;
}

#btnIncreaseAmount:hover {
    background: rgba(112, 0, 255, 0.15);
    color: #7000ff;
    border-color: #7000ff;
}

/* Live Analyzer Button (PhonePe Style) */
.btn-live {
    background: linear-gradient(45deg, var(--secondary-accent), #001eff);
    color: #ffffff;
    font-weight: 700;
    padding: 16px 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--btn-radius);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    display: inline-block;
    box-shadow: 0 0 15px rgba(112, 0, 255, 0.3);
    text-decoration: none;
    line-height: normal;
    /* Fix alignment */
}

.btn-live:hover {
    box-shadow: 0 0 30px rgba(112, 0, 255, 0.6);
    transform: translateY(-2px);
    border-color: #fff;
    color: #fff;
}

.bank-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 360px;
    background: #121a2f;
    border-left: 6px solid #ff3b3b;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: none;
    z-index: 9999;
}

/* HEADER */
.bank-alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #1b2540;
    font-weight: 600;
    font-size: 0.95rem;
}

.bank-alert-header span:last-child {
    font-size: 0.75rem;
    color: #aaa;
}

/* BODY */
.bank-alert-body {
    display: flex;
    padding: 14px;
    gap: 12px;
}

.bank-icon {
    font-size: 2.2rem;
}

.bank-text strong {
    display: block;
    font-size: 1.05rem;
    color: #ff4d4d;
    margin-bottom: 6px;
}

.bank-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #d0d4ff;
    line-height: 1.4;
}

.ai-tag {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #8ab4ff;
}

/* ANIMATIONS */
.bank-alert.show {
    display: block;
    animation: slideIn 0.4s ease-out;
}

.bank-alert.hide {
    animation: fadeOut 0.4s ease-in forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

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

@keyframes fadeOut {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 20px 10px;
    }

    .upload-section,
    .results {
        padding: 20px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .summary-card span {
        font-size: 2rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 15px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        padding: 20px 20px 0;
    }

    .agent-section {
        padding: 20px;
    }

    .btn-primary {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
        letter-spacing: -1px;
    }

    .summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chart-container {
        min-height: 300px;
    }

    .btn-secondary-outline {
        width: 100%;
        margin: 5px 0;
    }

    .detail-item span {
        font-size: 1.1rem;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 20px;
    }

    /* Loader Responsiveness */
    .cyber-hud {
        width: 90%;
        height: auto;
        flex-direction: column;
        gap: 20px;
        padding: 40px 20px;
    }

    .cyber-text-container {
        text-align: center;
        width: 100%;
    }

    .cyber-text {
        font-size: 1.1rem;
        min-height: 3rem;
    }

    .cyber-hud-small {
        flex-direction: column;
        padding: 20px;
        text-align: center;
        width: 80%;
    }

    .cyber-text-container-small {
        text-align: center;
    }
}

/* Scoring Decomposition Styles */
/* Scoring Decomposition Styles - Refined for Clarity */
.breakdown-header {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    color: var(--secondary-accent);
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 800;
    text-transform: uppercase;
    opacity: 0.9;
}

.score-details-container {
    background: rgba(112, 0, 255, 0.05);
    border: 1px solid rgba(112, 0, 255, 0.15);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: inset 0 0 20px rgba(112, 0, 255, 0.05);
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.score-row:last-of-type {
    border-bottom: none;
    margin-bottom: 5px;
}

.score-label {
    color: #a0a0a0;
    font-size: 0.85rem;
    font-weight: 500;
}

.score-value-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.score-value {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
}

.score-weight {
    color: #666;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 4px;
}

.score-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(112, 0, 255, 0.3), transparent);
    margin: 20px 0;
}

.score-row.total {
    margin-top: 5px;
    background: rgba(0, 242, 234, 0.03);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 242, 234, 0.1);
}

.score-row.total .score-label {
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
}

.score-row.total .score-value {
    color: var(--primary-accent);
    font-size: 1.5rem;
    text-shadow: 0 0 20px rgba(0, 242, 234, 0.4);
}

@media (max-width: 480px) {
    .score-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .score-value-group {
        align-items: flex-start;
        width: 100%;
    }
}

/* Investigative Discovery Guide Legend */
.investigative-guide {
    display: flex;
    gap: 30px;
    margin: 10px 0 25px 0;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    flex-wrap: wrap;
    animation: fadeIn 0.8s ease-out;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guide-tag {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
}

.guide-tag.user {
    background: rgba(0, 242, 234, 0.1);
    color: var(--primary-accent);
    border: 1px solid rgba(0, 242, 234, 0.3);
}

.guide-tag.score {
    background: rgba(112, 0, 255, 0.1);
    color: var(--secondary-accent);
    border: 1px solid rgba(112, 0, 255, 0.3);
}

.guide-tag.status {
    background: rgba(255, 59, 59, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 59, 59, 0.3);
}

.guide-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.guide-text b {
    color: #fff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .investigative-guide {
        gap: 15px;
        padding: 15px;
    }

    .guide-item {
        width: 100%;
    }
}

/* Bank Manager Protocol Styles - Enhanced for Forensic Clarity */
.protocol-section {
    margin-top: 35px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.protocol-header {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    color: #ffd700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.protocol-header::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), transparent);
}

.protocol-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-protocol {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 15px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-protocol .icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

.btn-protocol:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-protocol.freeze:hover {
    border-color: #ff8c00;
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.25);
}

.btn-protocol.approve:hover {
    border-color: #00ff9d;
    box-shadow: 0 8px 25px rgba(0, 255, 157, 0.25);
}

.btn-protocol.report:hover {
    border-color: #4dabff;
    box-shadow: 0 8px 25px rgba(77, 171, 255, 0.25);
}

.protocol-feedback {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    min-height: 60px;
    position: relative;
    overflow: hidden;
}

.protocol-feedback::before {
    content: "SYSTEM_LOG";
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.6rem;
    color: #444;
}

.danger-text {
    color: #ff5555;
    border-left: 3px solid #ff5555;
}

.success-text {
    color: #00ff9d;
    border-left: 3px solid #00ff9d;
}

.info-text {
    color: #4dabff;
    border-left: 3px solid #4dabff;
}

.typing-text {
    border-right: 2px solid var(--primary-accent);
    animation: cursorBlink 0.8s infinite;
}

@keyframes cursorBlink {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: var(--primary-accent);
    }
}

@media (max-width: 480px) {
    .protocol-actions {
        flex-direction: column;
    }
}

/* Network Topology Map Styles - Forensic Focus */
.topology-container {
    margin: 30px 0;
    padding: 25px;
    background: rgba(0, 242, 234, 0.02);
    border: 1px solid rgba(0, 242, 234, 0.2);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.topology-header {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    color: #00f2ea;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topology-header::before {
    content: "●";
    animation: networkPulse 1.5s infinite;
}

@keyframes networkPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.2);
    }
}

.topology-map {
    height: 250px;
    width: 100%;
    background:
        radial-gradient(circle at center, rgba(0, 242, 234, 0.05) 0%, transparent 75%),
        repeating-linear-gradient(rgba(255, 255, 255, 0.01) 0px, rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 20px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.01) 0px, rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 20px);
    position: relative;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.node-circle {
    fill: #050505;
    stroke: #00f2ea;
    stroke-width: 2.5;
    transition: all 0.3s ease;
}

.node-text {
    fill: #ffffff;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.edge-path {
    fill: none;
    stroke: #ff3b3b;
    stroke-width: 2.5;
    stroke-dasharray: 6, 6;
    animation: flowNode 2.5s linear infinite;
    filter: drop-shadow(0 0 3px rgba(255, 59, 59, 0.4));
}

@keyframes flowNode {
    from {
        stroke-dashoffset: 24;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.node-pulse {
    animation: pulseNode 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pulseNode {

    0%,
    100% {
        r: 15;
        stroke-width: 2.5;
        stroke-opacity: 1;
    }

    50% {
        r: 19;
        stroke-width: 1.5;
        stroke-opacity: 0.4;
    }
}