:root {
    --primary-green: #00ff41;
    --accent-cyan: #00ffff;
    --accent-magenta: #ff00ff;
    --bg-dark: #000000;
    --bg-darker: #0a0a0a;
    --border-color: rgba(0, 255, 65, 0.3);
    --glow-color: rgba(0, 255, 65, 0.5);
}

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

body {
    background: 
        radial-gradient(ellipse at top, #001a0a 0%, #000000 50%),
        #000000;
    color: var(--primary-green);
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative;
}

/* Animated Scanlines */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        rgba(0, 255, 65, 0.03) 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
    animation: scanline-move 8s linear infinite;
}

@keyframes scanline-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* Grid Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

/* Terminal Container */
.terminal {
    width: 95%;
    max-width: 1400px;
    height: 95vh;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, 
        rgba(0, 10, 5, 0.95) 0%, 
        rgba(0, 0, 0, 0.98) 100%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 2px var(--primary-green),
        0 0 10px rgba(0, 255, 65, 0.2),
        inset 0 0 30px rgba(0, 255, 65, 0.03);
    z-index: 10;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.5);
    font-size: 0.85em;
    letter-spacing: 1px;
}

.status-left, .status-right, .status-center {
    display: flex;
    gap: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-green);
    box-shadow: 0 0 5px var(--primary-green);
}

.status-dot.active {
    animation: pulse 2s ease-in-out infinite;
}

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

.status-indicator {
    color: var(--accent-cyan);
}

.accent-cyan {
    color: var(--accent-cyan);
    text-shadow: 0 0 5px var(--accent-cyan);
}

.accent-magenta {
    color: var(--accent-magenta);
    text-shadow: 0 0 5px var(--accent-magenta);
}

/* Header */
.terminal-header {
    position: relative;
    text-align: center;
    padding: 30px 20px 20px;
    border-bottom: 1px solid var(--border-color);
}

.header-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 100px;
    background: radial-gradient(ellipse, rgba(0, 255, 65, 0.2), transparent);
    filter: blur(30px);
    pointer-events: none;
}

.terminal-header h1 {
    font-size: 3em;
    font-weight: 300;
    letter-spacing: 8px;
    margin: 0;
    text-shadow: 
        0 0 10px var(--primary-green),
        0 0 20px rgba(0, 255, 65, 0.5),
        0 0 30px rgba(0, 255, 65, 0.3);
    animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
    from { 
        text-shadow: 
            0 0 10px var(--primary-green),
            0 0 20px rgba(0, 255, 65, 0.5),
            0 0 30px rgba(0, 255, 65, 0.3);
    }
    to { 
        text-shadow: 
            0 0 15px var(--primary-green),
            0 0 30px rgba(0, 255, 65, 0.7),
            0 0 45px rgba(0, 255, 65, 0.5);
    }
}

.subtitle {
    font-size: 0.9em;
    margin: 10px 0 20px;
    opacity: 0.7;
    letter-spacing: 3px;
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 20px auto;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    color: var(--primary-green);
    font-family: inherit;
    font-size: 0.95em;
    letter-spacing: 1px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    background: rgba(0, 0, 0, 0.7);
}

.search-input::placeholder {
    color: rgba(0, 255, 65, 0.4);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-cyan);
}

/* Navigation */
.terminal-nav {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--primary-green);
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.2), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.nav-icon {
    font-size: 1.1em;
}

/* Main Content */
.terminal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    gap: 20px;
}

/* Console Panel */
.console-panel {
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 150px;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85em;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.5);
}

.console-clear {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--primary-green);
    padding: 3px 10px;
    font-family: inherit;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
}

.console-clear:hover {
    background: var(--primary-green);
    color: var(--bg-dark);
}

.output-area {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-size: 0.95em;
    line-height: 1.6;
    white-space: pre-wrap;
}

.output-area::-webkit-scrollbar {
    width: 8px;
}

.output-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.output-area::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Data Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    overflow-y: auto;
    padding: 5px;
}

.data-grid::-webkit-scrollbar {
    width: 8px;
}

.data-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.data-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.data-item {
    border: 1px solid var(--border-color);
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.data-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.data-item:hover::before {
    transform: translateX(100%);
}

.data-item:hover {
    border-color: var(--primary-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    transform: translateY(-3px);
    background: rgba(0, 0, 0, 0.6);
}

.data-item h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    letter-spacing: 1px;
    color: var(--accent-cyan);
}

.data-item p {
    font-size: 0.9em;
    margin-bottom: 15px;
    opacity: 0.8;
    line-height: 1.5;
}

.data-meta {
    font-size: 0.8em;
    opacity: 0.6;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.access-btn {
    background: rgba(0, 255, 65, 0.1);
    color: var(--primary-green);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    font-family: inherit;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    width: 100%;
}

.access-btn:hover {
    background: var(--primary-green);
    color: var(--bg-dark);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Footer / Command Panel */
.terminal-footer {
    border-top: 1px solid var(--border-color);
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
}

.command-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-line {
    font-size: 0.9em;
    opacity: 0.8;
    letter-spacing: 1px;
}

.command-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt {
    color: var(--accent-cyan);
    white-space: nowrap;
}

.command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--primary-green);
    font-family: inherit;
    font-size: 1em;
    outline: none;
    letter-spacing: 1px;
}

.command-input::placeholder {
    color: rgba(0, 255, 65, 0.3);
}

#cursor {
    animation: blink 1s step-end infinite;
    color: var(--primary-green);
}

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

/* Loading Animation */
@keyframes loading-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.loading {
    animation: loading-pulse 1.5s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal {
        width: 100%;
        height: 100vh;
    }
    
    .terminal-header h1 {
        font-size: 2em;
        letter-spacing: 4px;
    }
    
    .status-bar {
        font-size: 0.75em;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
    }
}