/* Palette: Void Black, Neon Cyan, Matrix Green, Dark Grey */
:root {
    --bg: #050505;
    --panel: #0a0a0a;
    --cyan: #00FFFF;
    --cyan-dim: rgba(0, 255, 255, 0.2);
    --green: #00FF41;
    --text: #e0e0e0;
    --grid-line: #1a1a1a;
    
    --font-mono: 'Fira Code', monospace;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Grid */
.data-grid-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-padding { padding: 120px 0; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Header */
.lab-header { padding: 20px 0; background: rgba(5,5,5,0.9); border-bottom: 1px solid var(--cyan-dim); position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(5px); }
.header-flex { display: flex; justify-content: space-between; align-items: center; }

.logo { font-family: var(--font-mono); font-size: 1.4rem; color: var(--text); letter-spacing: -1px; font-weight: 600; }
.blink { animation: blink 1s infinite; color: var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }

.system-status { font-family: var(--font-mono); font-size: 0.8rem; color: var(--green); border: 1px solid var(--green); padding: 4px 10px; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 5px var(--green); }

.matrix-nav a { margin-left: 20px; font-family: var(--font-mono); font-size: 0.9rem; color: #888; }
.matrix-nav a:hover, .matrix-nav a.active { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }

.mobile-term { display: none; background: transparent; border: 1px solid var(--cyan); color: var(--cyan); padding: 5px 10px; font-family: var(--font-mono); cursor: pointer; }

/* Mobile Console */
.mobile-console { position: fixed; top: 0; right: -100%; width: 100%; height: 100%; background: var(--bg); z-index: 2000; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: 0.3s; border-left: 2px solid var(--cyan); }
.mobile-console.active { right: 0; }
.close-console { position: absolute; top: 20px; right: 20px; background: transparent; border: 1px solid var(--text); color: var(--text); padding: 5px 10px; font-family: var(--font-mono); cursor: pointer; }
.mobile-console a { font-family: var(--font-mono); font-size: 1.5rem; margin: 15px 0; color: var(--text); }
.mobile-console a:hover { color: var(--cyan); }

@media (max-width: 900px) {
    .matrix-nav, .system-status { display: none; }
    .mobile-term { display: block; }
}

/* Hero */
.hero-matrix { height: 85vh; display: flex; align-items: center; border-bottom: 1px solid #1a1a1a; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; align-items: center; }

.code-header { font-family: var(--font-mono); color: #666; margin-bottom: 20px; font-size: 0.9rem; }
.hero-text h1 { font-family: var(--font-body); font-size: 4rem; line-height: 1.1; margin-bottom: 20px; font-weight: 700; letter-spacing: -2px; }
.neon-cyan { color: var(--cyan); text-shadow: 0 0 15px var(--cyan-dim); }
.hero-text p { font-size: 1.2rem; color: #aaa; margin-bottom: 40px; max-width: 500px; border-left: 2px solid var(--cyan); padding-left: 20px; }

.cta-terminal { display: flex; gap: 20px; }
.btn-cyan { background: var(--cyan-dim); border: 1px solid var(--cyan); color: var(--cyan); padding: 15px 30px; font-family: var(--font-mono); font-weight: 600; cursor: pointer; transition: 0.3s; }
.btn-cyan:hover { background: var(--cyan); color: var(--bg); box-shadow: 0 0 20px var(--cyan); }
.btn-outline { border: 1px solid #555; color: #fff; padding: 15px 30px; font-family: var(--font-mono); font-weight: 600; }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

/* Data Sphere Visual */
.data-sphere { width: 300px; height: 300px; position: relative; margin: 0 auto; display: flex; justify-content: center; align-items: center; }
.ring { position: absolute; border: 1px solid var(--cyan); border-radius: 50%; opacity: 0.6; }
.r1 { width: 100%; height: 100%; animation: spin 10s linear infinite; border-top-color: transparent; border-bottom-color: transparent; }
.r2 { width: 70%; height: 70%; animation: spin 7s linear infinite reverse; border-left-color: transparent; border-right-color: transparent; border-width: 2px; }
.r3 { width: 40%; height: 40%; animation: spin 4s linear infinite; border: 1px dashed var(--cyan); }
.core { font-family: var(--font-mono); color: var(--cyan); font-weight: 700; font-size: 2rem; text-shadow: 0 0 10px var(--cyan); }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Data Stream */
.data-stream { background: var(--panel); color: var(--cyan); font-family: var(--font-mono); padding: 10px 0; overflow: hidden; white-space: nowrap; border-bottom: 1px solid #333; font-size: 0.9rem; }
.stream-content { animation: stream 25s linear infinite; display: inline-block; padding-left: 100%; }
@keyframes stream { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* Modules */
.section-head h2 { font-family: var(--font-mono); font-size: 2.5rem; color: var(--white); margin-bottom: 15px; }
.cyan-line { width: 60px; height: 4px; background: var(--cyan); margin-bottom: 40px; box-shadow: 0 0 10px var(--cyan); }
.cyan-line.left { margin: 20px 0 40px 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.lab-card { background: rgba(10, 10, 10, 0.8); border: 1px solid #333; padding: 30px; transition: 0.3s; position: relative; overflow: hidden; }
.lab-card:hover { border-color: var(--cyan); box-shadow: 0 0 20px var(--cyan-dim); }
.card-icon { font-family: var(--font-mono); font-size: 3rem; color: #333; font-weight: 700; position: absolute; top: 10px; right: 20px; transition: 0.3s; }
.lab-card:hover .card-icon { color: var(--cyan); opacity: 0.2; }
.lab-card h3 { font-family: var(--font-mono); color: var(--cyan); font-size: 1.2rem; margin-bottom: 15px; }

/* About */
.about-interface { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.interface-text h1 { font-family: var(--font-body); font-size: 3rem; margin-bottom: 20px; line-height: 1.1; }
.code-block { background: #111; padding: 20px; border-radius: 5px; font-family: var(--font-mono); font-size: 0.9rem; margin-top: 30px; border-left: 3px solid var(--green); }
.var { color: #cc7832; } .string { color: #6a8759; } .func { color: #ffc66d; } .bool { color: #9876aa; }
.interface-img { position: relative; }
.overlay-grid { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="rgba(0,255,255,0.3)"/></svg>'); pointer-events: none; }

/* Solutions List */
.solutions-grid { display: grid; grid-template-columns: 1fr; gap: 30px; max-width: 800px; margin: 0 auto; }
.solution-item { background: var(--panel); border: 1px solid #333; padding: 30px; transition: 0.3s; }
.solution-item.active { border-color: var(--cyan); background: rgba(0, 255, 255, 0.03); }
.sol-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.sol-header h3 { font-family: var(--font-mono); font-size: 1.3rem; color: var(--white); margin: 0; }
.badge { font-family: var(--font-mono); font-size: 0.8rem; background: #222; padding: 3px 8px; color: var(--cyan); border: 1px solid var(--cyan); }
.specs { list-style: none; margin-top: 20px; font-family: var(--font-mono); color: #888; font-size: 0.9rem; }

/* Contact Console */
.console-box { max-width: 700px; margin: 0 auto; background: #080808; border: 1px solid #333; font-family: var(--font-mono); box-shadow: 0 0 30px rgba(0,0,0,0.5); }
.console-header { background: #151515; padding: 10px; border-bottom: 1px solid #333; display: flex; gap: 5px; color: #666; font-size: 0.8rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }
.console-body { padding: 40px; }
.info-output { margin-bottom: 30px; color: var(--cyan); border-bottom: 1px dashed #333; padding-bottom: 20px; }

.code-form .input-line { margin-bottom: 20px; }
.code-form label { display: block; color: #888; margin-bottom: 5px; font-size: 0.9rem; }
.code-form input, .code-form select, .code-form textarea { width: 100%; background: #111; border: 1px solid #333; color: var(--green); padding: 10px; font-family: var(--font-mono); }
.code-form input:focus, .code-form select:focus, .code-form textarea:focus { border-color: var(--cyan); outline: none; }
.bracket { display: block; color: #888; margin-top: 5px; }
.btn-run { width: 100%; background: var(--cyan); color: var(--bg); border: none; padding: 15px; font-family: var(--font-mono); font-weight: 700; cursor: pointer; margin-top: 20px; }
.btn-run:hover { background: #fff; }

/* Legal */
.legal-code { max-width: 800px; margin: 0 auto; color: #ccc; font-family: var(--font-mono); }
.legal-code h1 { font-family: var(--font-body); color: var(--white); }

/* Footer */
.lab-footer { border-top: 1px solid #222; padding: 60px 0 20px; margin-top: 100px; font-family: var(--font-mono); }
.footer-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.f-info h4 { color: var(--cyan); margin-bottom: 5px; }
.f-links a { margin-left: 20px; color: #666; }
.f-links a:hover { color: var(--white); }
.copyright { text-align: center; font-size: 0.7rem; color: #444; }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 3rem; }
    .grid-3, .about-interface { grid-template-columns: 1fr; }
    .footer-row { flex-direction: column; gap: 20px; text-align: center; }
}