/* ==========================================
   NumSpy - Hacker Terminal Theme
   ========================================== */

:root {
    --neon: #00ff41;
    --dark-green: #003b00;
    --bg: #050505;
    --panel: #0d0d0d;
    --alert: #ff0055;
    --cyan: #00e5ff;
    --yellow: #ffcc00;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--neon);
    font-family: 'Share Tech Mono', monospace;
    margin: 0;
    padding: 20px;
    background-image:
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scanline effect */
body::after {
    content: "";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

/* Typography */
h1,
h2,
h3,
h4 {
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--dark-green);
    padding-bottom: 8px;
    margin-top: 0;
    font-weight: normal;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 5px var(--cyan);
}

.blink {
    animation: blinker 1s step-end infinite;
}

.badass-brand {
    color: var(--alert);
    font-weight: bold;
    text-shadow: 0 0 5px var(--alert);
}

/* Layout */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 5;
    flex: 1;
    /* Pushes footer down */
}

.main-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 25px;
}

.intel-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

@media (max-width: 900px) {

    .main-grid,
    .intel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header>div {
        width: 100%;
        text-align: left !important;
    }

    .header h1 {
        font-size: 1.5em;
        /* Smaller font on mobile */
    }
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--neon);
    padding-bottom: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;

    /* Sticky */
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 5, 5, 0.95);
    padding-top: 20px;
    margin-top: -20px;
    /* Counteract body padding for full stickiness */
    backdrop-filter: blur(5px);
}

.header h1 {
    border: none;
    margin: 0;
    padding: 0;
}

/* Forms */
.search-form {
    display: flex;
    gap: 0;
    border: 1px solid var(--neon);
}

input,
textarea,
select {
    background: #000;
    border: 1px solid var(--dark-green);
    color: var(--neon);
    padding: 12px;
    font-family: inherit;
    font-size: 1em;
    outline: none;
    width: 100%;
    transition: 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--neon);
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

.search-form input {
    border: none;
    font-size: 1.2em;
}

button,
.btn {
    background: var(--neon);
    color: #000;
    border: none;
    padding: 12px 25px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
    transition: 0.2s;
    white-space: nowrap;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

button:hover,
.btn:hover {
    background: #fff;
    box-shadow: 0 0 10px #fff;
}

.btn-danger {
    background: var(--alert);
    color: #fff;
}

.btn-danger:hover {
    box-shadow: 0 0 10px var(--alert);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--neon);
    color: var(--neon);
}

.btn-secondary:hover {
    background: var(--neon);
    color: #000;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* Sidebar */
.sidebar {
    border-right: 1px solid var(--dark-green);
    padding-right: 20px;
}

.log-entry {
    display: block;
    padding: 10px;
    border-bottom: 1px solid #111;
    color: #888;
    text-decoration: none;
    transition: 0.2s;
}

.log-entry:hover {
    background: #111;
    color: var(--neon);
    border-left: 2px solid var(--neon);
}

.log-time {
    font-size: 0.7em;
    color: var(--cyan);
    float: right;
}

/* Cards */
.card {
    border: 1px solid var(--dark-green);
    background: rgba(0, 10, 0, 0.85);
    padding: 20px;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
}

.card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 15px;
    height: 15px;
    border-top: 2px solid var(--neon);
    border-left: 2px solid var(--neon);
}

.card::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 15px;
    height: 15px;
    border-bottom: 2px solid var(--neon);
    border-right: 2px solid var(--neon);
}

/* Profile Image */
.profile-pic {
    width: 100%;
    border: 1px solid var(--neon);
    filter: grayscale(100%) sepia(20%) hue-rotate(90deg) contrast(120%);
}

.no-pic {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--dark-green);
    color: #555;
    text-align: center;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

td,
th {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
}

th {
    color: #888;
    font-size: 0.9em;
    font-weight: normal;
    text-transform: uppercase;
}

td {
    color: #fff;
}

tr:hover {
    background: rgba(0, 255, 65, 0.05);
}

/* Name List */
.name-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.name-list li {
    background: rgba(0, 255, 65, 0.1);
    border-left: 3px solid var(--neon);
    padding: 8px 12px;
    margin-bottom: 5px;
    font-size: 1.1em;
    color: #fff;
}

/* Telemetry Box */
.telemetry-box {
    font-size: 0.8em;
    color: var(--cyan);
    background: #000;
    padding: 10px;
    border: 1px solid var(--dark-green);
    margin-top: 5px;
    font-family: monospace;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.8em;
    border-radius: 2px;
    text-transform: uppercase;
}

.badge-danger {
    background: var(--alert);
    color: #000;
}

.badge-success {
    background: var(--neon);
    color: #000;
}

.badge-warning {
    background: var(--yellow);
    color: #000;
}

.badge-info {
    background: var(--cyan);
    color: #000;
}

/* External Links */
.btn-link {
    display: inline-block;
    background: #000;
    color: var(--cyan);
    border: 1px solid var(--dark-green);
    padding: 6px 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    text-decoration: none;
    font-size: 0.8em;
    transition: 0.3s;
}

.btn-link:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 5px var(--cyan);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(0, 10, 0, 0.8);
    border: 1px solid var(--dark-green);
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 2.5em;
    color: var(--neon);
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #888;
    text-transform: uppercase;
    font-size: 0.9em;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #555;
    font-size: 0.8em;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid;
}

.alert-success {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--neon);
    color: var(--neon);
}

.alert-danger {
    background: rgba(255, 0, 85, 0.1);
    border-color: var(--alert);
    color: var(--alert);
}

.alert-warning {
    background: rgba(255, 204, 0, 0.1);
    border-color: var(--yellow);
    color: var(--yellow);
}

/* Admin Nav */
.admin-nav {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--dark-green);
    margin-bottom: 30px;
    padding-bottom: 0;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 10px 20px;
    color: #888;
    background: rgba(0, 20, 0, 0.5);
    border: 1px solid var(--dark-green);
    border-bottom: none;
    transition: 0.2s;
    font-size: 0.9em;
    margin-bottom: -2px;
    /* Connect to border */
    position: relative;
}

.admin-nav a:hover {
    background: rgba(0, 255, 65, 0.05);
    color: #fff;
    cursor: pointer;
}

.admin-nav a.active {
    background: var(--bg);
    color: var(--neon);
    border-color: var(--neon);
    border-bottom: 2px solid var(--bg);
    /* Hide bottom border to merge */
    z-index: 2;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--dark-green);
    color: #888;
}

.pagination a:hover,
.pagination .current {
    background: var(--neon);
    color: #000;
    border-color: var(--neon);
}

/* Footer */
.footer {
    text-align: right;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #111;
    font-size: 0.8em;
    color: #555;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #555;
}

.empty-state h2 {
    border: none;
    color: #666;
}

/* Animations */
@keyframes blinker {
    50% {
        opacity: 0;
    }
}

@keyframes flicker {
    0% {
        opacity: 0.1;
    }

    5% {
        opacity: 0.15;
    }

    100% {
        opacity: 0.1;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-green);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon);
}