@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Fira+Code:wght@400;700&display=swap');

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

body {
    font-family: 'Fira Code', monospace;
    background: #0a0a0a;
    color: #00ff00;
    overflow-x: hidden;
    position: relative;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03) 0px,
        rgba(0, 255, 0, 0.03) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 0;
}

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(0, 255, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
    animation: matrixMove 30s linear infinite;
}

@keyframes matrixMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 0;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #050505;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(5, 5, 5, 0.98);
    border: 2px solid #00ff00;
    border-radius: 20px;
    padding: 50px;
    width: 380px;
    box-shadow: 0 0 60px rgba(0, 255, 0, 0.3), inset 0 0 60px rgba(0, 255, 0, 0.05);
    animation: loginGlow 3s ease-in-out infinite;
    text-align: center;
}

@keyframes loginGlow {
    0%, 100% { box-shadow: 0 0 60px rgba(0, 255, 0, 0.3); }
    50% { box-shadow: 0 0 120px rgba(0, 255, 0, 0.6); }
}

.login-box h1 {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    color: #00ff00;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    margin-bottom: 30px;
    letter-spacing: 3px;
}

.login-box .mr-r-logo {
    font-size: 60px;
    margin-bottom: 10px;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-box input {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    color: #00ff00;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    transition: all 0.3s;
}

.login-box input:focus {
    border-color: #00ff00;
    outline: none;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
}

.login-box button {
    width: 100%;
    padding: 14px;
    margin-top: 15px;
    background: #00ff00;
    color: #000;
    font-weight: 900;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Orbitron', monospace;
    letter-spacing: 2px;
}

.login-box button:hover {
    background: #00cc00;
    box-shadow: 0 0 50px rgba(0, 255, 0, 0.5);
}

.error-msg {
    color: #ff0000;
    font-size: 14px;
    margin-bottom: 15px;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.95);
    border: 2px solid #00ff00;
    border-radius: 15px;
    padding: 15px 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.15);
}

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

.glitch-text {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 24px;
    color: #00ff00;
    text-shadow: 3px 3px 0 #ff0000, -3px -3px 0 #00ff00;
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0% { text-shadow: 3px 3px 0 #ff0000, -3px -3px 0 #00ff00; }
    20% { text-shadow: -3px 3px 0 #ff0000, 3px -3px 0 #00ff00; }
    40% { text-shadow: 3px -3px 0 #ff0000, -3px 3px 0 #00ff00; }
    60% { text-shadow: -3px -3px 0 #ff0000, 3px 3px 0 #00ff00; }
    80% { text-shadow: 3px 3px 0 #00ff00, -3px -3px 0 #ff0000; }
    100% { text-shadow: 3px 3px 0 #ff0000, -3px -3px 0 #00ff00; }
}

.status-dot {
    font-size: 14px;
    color: #00ff00;
    animation: blink 1s infinite;
}

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

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

.user-tag {
    color: #00ff00;
    font-size: 14px;
    font-weight: bold;
}

.btn-logout {
    color: #ff0000;
    text-decoration: none;
    border: 1px solid #ff0000;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-logout:hover {
    background: #ff0000;
    color: #000;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
}

.command-box {
    background: rgba(5, 5, 5, 0.95);
    border: 2px solid #00ff00;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.15);
}

.command-box h3 {
    font-family: 'Orbitron', monospace;
    color: #00ff00;
    font-size: 18px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.command-box select {
    padding: 12px 20px;
    background: #111;
    border: 1px solid #00ff00;
    color: #00ff00;
    font-family: 'Fira Code', monospace;
    border-radius: 8px;
    margin-right: 15px;
    width: 200px;
}

.command-box button {
    padding: 12px 30px;
    background: #00ff00;
    color: #000;
    font-weight: 900;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
}

.command-box button:hover {
    background: #00cc00;
    box-shadow: 0 0 50px rgba(0, 255, 0, 0.4);
}

.command-status {
    margin-top: 20px;
    color: #00ff00;
    font-size: 15px;
}

.command-status strong {
    color: #ff0000;
    font-size: 16px;
}

.search-sort-box {
    margin-bottom: 20px;
}

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

.search-input {
    padding: 10px;
    background: #111;
    border: 1px solid #00ff00;
    color: #00ff00;
    width: 200px;
    font-family: 'Fira Code', monospace;
}

.sort-select {
    padding: 10px;
    background: #111;
    border: 1px solid #00ff00;
    color: #00ff00;
    font-family: 'Fira Code', monospace;
}

.search-sort-btn {
    padding: 10px 20px;
    background: #00ff00;
    color: #000;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.reset-btn {
    padding: 10px 20px;
    background: #111;
    border: 1px solid #ff0000;
    color: #ff0000;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(5, 5, 5, 0.95);
    border: 2px solid #00ff00;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.1);
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: 0 0 60px rgba(0, 255, 0, 0.3);
    transform: scale(1.02);
}

.stat-icon {
    font-size: 35px;
    margin-bottom: 10px;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 32px;
    color: #00ff00;
    font-weight: 900;
}

.stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
    letter-spacing: 1px;
}

.target-section {
    margin-bottom: 50px;
    border: 2px solid #00ff00;
    border-radius: 15px;
    padding: 20px;
    background: rgba(5, 5, 5, 0.95);
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.1);
}

.target-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
    margin-bottom: 20px;
}

.target-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.target-icon {
    font-size: 30px;
}

.target-name {
    font-family: 'Orbitron', monospace;
    font-size: 22px;
    color: #00ff00;
    font-weight: 900;
}

.target-device {
    color: #888;
    font-size: 14px;
}

.target-stats {
    color: #888;
    font-size: 14px;
}

.target-menu {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.target-menu .menu-btn {
    padding: 10px 20px;
    background: #111;
    border: 1px solid #00ff00;
    color: #00ff00;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
    font-size: 13px;
}

.target-menu .menu-btn:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.target-data {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.data-section {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 15px;
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #222;
    padding-bottom: 8px;
}

.data-header h3 {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    color: #00ff00;
}

.file-count {
    color: #888;
    font-size: 12px;
}

.table-container {
    overflow-x: auto;
}

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

table th {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #333;
    color: #888;
    font-size: 12px;
    letter-spacing: 1px;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #222;
    font-size: 14px;
}

.file-link {
    color: #00ff00;
    text-decoration: none;
    transition: all 0.3s;
}

.file-link:hover {
    text-decoration: underline;
    color: #00cc00;
}

.btn-delete {
    color: #ff0000;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s;
}

.btn-delete:hover {
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    color: #ff4444;
}

.empty-msg {
    color: #666;
    text-align: center;
    padding: 15px;
}

.terminal-footer {
    margin-top: 50px;
    padding: 20px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid #222;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 13px;
    font-family: 'Fira Code', monospace;
}

.terminal-footer span {
    letter-spacing: 1px;
}