/* NeoPulse Cyberpunk UI Components */

/* ==================== CSS Variables ==================== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-panel: #1a1a2e;
    --bg-panel-transparent: rgba(26, 26, 46, 0.85);
    --accent-cyan: #00f0ff;
    --accent-pink: #ff00aa;
    --accent-yellow: #ffaa00;
    --accent-green: #00ff66;
    --accent-red: #ff0044;
    --text-primary: #e0e0ff;
    --text-secondary: #8080aa;
    --text-dim: #4a4a6a;
    --glow-cyan: 0 0 10px #00f0ff, 0 0 20px rgba(0, 240, 255, 0.4);
    --glow-pink: 0 0 10px #ff00aa, 0 0 20px rgba(255, 0, 170, 0.4);
    --glow-green: 0 0 10px #00ff66, 0 0 20px rgba(0, 255, 102, 0.4);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ==================== Base Styles ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

/* ==================== Grid Background ==================== */
.grid-background {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -3;
}
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15) 1px, transparent 1px, transparent 2px);
    pointer-events: none;
    z-index: 1000;
    opacity: 0.15;
}

/* ==================== Navbar ==================== */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 70px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    z-index: 100;
}
.nav-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo { display: flex; flex-direction: column; }
.logo-text { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.1em; }
.logo-text .accent { color: var(--accent-cyan); text-shadow: 0 0 10px var(--accent-cyan); }
.logo-subtitle { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-secondary); letter-spacing: 0.3em; }
.nav-menu { display: flex; gap: 40px; }
.nav-link {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
    transition: all 0.3s ease;
}
.nav-link::before {
    content: '';
    position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
    transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--accent-cyan); text-shadow: var(--glow-cyan); }
.nav-link.active::before, .nav-link:hover::before { width: 100%; }
.nav-status { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.7rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); box-shadow: var(--glow-green); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.status-text { color: var(--accent-green); }

/* ==================== Main Content ==================== */
.main-content { padding-top: 100px; padding-bottom: 80px; min-height: calc(100vh - 150px); }
.container { max-width: 1400px; margin: 0 auto; padding: 0 30px; }

/* ==================== Hero ==================== */
.hero { text-align: center; padding: 80px 0; }
.hero-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 3s ease-in-out infinite alternate;
}
@keyframes glow { 0% { filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.5)); } 100% { filter: drop-shadow(0 0 40px rgba(0, 240, 255, 0.8)); } }
.hero-subtitle { font-size: 1.3rem; color: var(--text-secondary); letter-spacing: 0.2em; margin-bottom: 50px; }

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    padding: 15px 35px;
    border: 1px solid var(--accent-cyan);
    background: transparent;
    color: var(--accent-cyan);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.btn::before {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
    transition: left 0.5s ease;
}
.btn:hover { background: rgba(0, 240, 255, 0.1); box-shadow: var(--glow-cyan); }
.btn:hover::before { left: 100%; }
.btn-primary { background: var(--accent-cyan); color: var(--bg-primary); }
.btn-primary:hover { background: var(--accent-pink); border-color: var(--accent-pink); }
.btn-danger { border-color: var(--accent-red); color: var(--accent-red); }
.btn-danger:hover { background: rgba(255, 0, 68, 0.2); box-shadow: 0 0 20px rgba(255, 0, 68, 0.5); }
.btn-sm { padding: 8px 20px; font-size: 0.75rem; }
.btn-lg { padding: 20px 50px; font-size: 1rem; }
.btn-icon { padding: 12px; min-width: 45px; min-height: 45px; }
.btn-group { display: flex; gap: 20px; flex-wrap: wrap; }

/* ==================== Cards ==================== */
.card {
    background: var(--bg-panel-transparent);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 4px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.card::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(255, 0, 170, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.card:hover { border-color: var(--accent-cyan); box-shadow: var(--glow-cyan); transform: translateY(-5px); }
.card:hover::before { opacity: 1; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.card-icon { font-family: var(--font-display); font-size: 2rem; color: var(--accent-cyan); margin-bottom: 20px; }
.card-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-bottom: 15px; }
.card-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.8; }

/* Feature Card */
.feature-card { text-align: center; padding: 40px 30px; }
.feature-icon { font-size: 2.5rem; margin-bottom: 25px; }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
    position: relative;
    padding: 10px 0 10px 25px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
}

/* ==================== Form Elements ==================== */
.form-group { margin-bottom: 25px; }
.form-label { display: block; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); letter-spacing: 0.1em; margin-bottom: 10px; }
.form-input {
    width: 100%;
    padding: 15px 20px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--bg-panel);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 2px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}
.form-input:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 15px rgba(0, 240, 255, 0.3); }
.form-input::placeholder { color: var(--text-dim); }
textarea.form-input { min-height: 120px; resize: vertical; }
select.form-input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300f0ff' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }

/* ==================== Checkbox & Radio ==================== */
.form-check, .form-radio {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 15px;
}
.form-check input, .form-radio input {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent-cyan);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}
.form-check input:checked { background: var(--accent-cyan); }
.form-check input:checked::after {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 14px;
    font-weight: bold;
}
.form-radio input { border-radius: 50%; }
.form-radio input:checked { background: var(--accent-cyan); box-shadow: inset 0 0 0 4px var(--bg-primary); }
.form-check-label, .form-radio-label { font-size: 0.95rem; color: var(--text-primary); }

/* ==================== Switch ==================== */
.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    cursor: pointer;
}
.switch input { display: none; }
.switch-frame {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 240, 255, 0.05);
    border: 2px solid var(--accent-cyan);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3), inset 0 0 10px rgba(0, 240, 255, 0.1);
    transition: all 0.3s ease;
}
.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan), 0 0 20px rgba(0, 240, 255, 0.5);
    transition: all 0.3s ease;
}
.switch input:checked ~ .switch-frame {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--accent-cyan);
}
.switch input:checked ~ .switch-thumb {
    transform: translateX(28px);
    background: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan), 0 0 30px rgba(0, 240, 255, 0.8);
}

/* ==================== Badges ==================== */
.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 5px 15px;
    border: 1px solid;
    border-radius: 2px;
}
.badge-cyan { border-color: var(--accent-cyan); color: var(--accent-cyan); background: rgba(0, 240, 255, 0.1); }
.badge-pink { border-color: var(--accent-pink); color: var(--accent-pink); background: rgba(255, 0, 170, 0.1); }
.badge-green { border-color: var(--accent-green); color: var(--accent-green); background: rgba(0, 255, 102, 0.1); }
.badge-yellow { border-color: var(--accent-yellow); color: var(--accent-yellow); background: rgba(255, 170, 0, 0.1); }
.badge-red { border-color: var(--accent-red); color: var(--accent-red); background: rgba(255, 0, 68, 0.1); }

/* ==================== Alert ==================== */
.alert {
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-family: var(--font-body);
    position: relative;
    overflow: hidden;
}
.alert::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
}
.alert-info { border: 1px solid var(--accent-cyan); background: rgba(0, 240, 255, 0.1); color: var(--accent-cyan); }
.alert-info::before { background: var(--accent-cyan); }
.alert-success { border: 1px solid var(--accent-green); background: rgba(0, 255, 102, 0.1); color: var(--accent-green); }
.alert-success::before { background: var(--accent-green); }
.alert-warning { border: 1px solid var(--accent-yellow); background: rgba(255, 170, 0, 0.1); color: var(--accent-yellow); }
.alert-warning::before { background: var(--accent-yellow); }
.alert-error { border: 1px solid var(--accent-red); background: rgba(255, 0, 68, 0.1); color: var(--accent-red); }
.alert-error::before { background: var(--accent-red); }
.alert-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
}
.alert-close:hover { opacity: 1; }

/* ==================== Modal (Popup) ==================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.show { display: flex; opacity: 1; }
.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--accent-cyan);
    border-radius: 4px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: var(--glow-cyan);
}
.modal-overlay.show .modal { transform: scale(1); }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}
.modal-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--accent-cyan); }
.modal-close {
    background: none; border: none; color: var(--text-secondary);
    font-size: 1.5rem; cursor: pointer;
    transition: color 0.3s ease;
}
.modal-close:hover { color: var(--accent-red); }
.modal-body { margin-bottom: 25px; color: var(--text-secondary); }
.modal-footer { display: flex; gap: 15px; justify-content: flex-end; }

/* ==================== Table ==================== */
.table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.table th, .table td { padding: 15px 20px; text-align: left; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.05em; border-bottom: 1px solid rgba(0, 240, 255, 0.15); }
.table th { color: var(--accent-cyan); font-weight: 600; background: var(--bg-panel); }
.table tr:hover td { background: rgba(0, 240, 255, 0.05); }

/* ==================== Tabs ==================== */
.tabs { margin-bottom: 30px; }
.tab-list { display: flex; gap: 5px; border-bottom: 1px solid rgba(0, 240, 255, 0.2); margin-bottom: 25px; }
.tab-item {
    padding: 12px 25px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}
.tab-item::before {
    content: '';
    position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px;
    background: var(--accent-cyan);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.tab-item:hover { color: var(--accent-cyan); }
.tab-item.active { color: var(--accent-cyan); }
.tab-item.active::before { transform: scaleX(1); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ==================== Progress ==================== */
.progress { height: 8px; background: var(--bg-panel); border-radius: 4px; overflow: hidden; margin-bottom: 15px; }
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}
.progress-bar::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255, 0.3), transparent);
    animation: progressShine 2s infinite;
}
@keyframes progressShine { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ==================== Tooltip ==================== */
.tooltip { position: relative; display: inline-block; }
.tooltip-text {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 15px;
    background: var(--accent-cyan);
    color: var(--bg-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 2px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}
.tooltip-text::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--accent-cyan);
}
.tooltip:hover .tooltip-text { opacity: 1; visibility: visible; }

/* ==================== Loader ==================== */
.loader-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--bg-panel);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-panel);
    border-radius: 50%;
    border-top-color: var(--accent-cyan);
    animation: spin 0.8s linear infinite;
}

/* ==================== Stats ==================== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 60px 0; }
.stat-item { text-align: center; padding: 30px 20px; background: var(--bg-panel-transparent); border: 1px solid rgba(0, 240, 255, 0.15); border-radius: 4px; position: relative; }
.stat-item::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink)); }
.stat-value { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; color: var(--accent-cyan); text-shadow: 0 0 20px rgba(0, 240,255,0.5); margin-bottom: 10px; }
.stat-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); letter-spacing: 0.2em; }

/* ==================== Footer ==================== */
.footer {
    background: rgba(10, 10, 15, 0.98);
    border-top: 1px solid rgba(0, 240, 255, 0.2);
    padding: 25px 0;
    z-index: 10;
}
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.system-status .status-ok { color: var(--accent-green); text-shadow: 0 0 10px var(--accent-green); }

/* ==================== Code Block ==================== */
.code-block {
    background: var(--bg-panel);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 4px;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    overflow-x: auto;
    margin: 20px 0;
}
.code-keyword { color: var(--accent-pink); }
.code-string { color: var(--accent-green); }
.code-comment { color: var(--text-dim); font-style: italic; }

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: 1fr; }
    .nav-menu { display: none; }
    .footer-container { flex-direction: column; gap: 10px; text-align: center; }
}