/* Premium Cyberpunk / Glassmorphism Theme */
:root {
    --bg-dark: #0a0a0f;
    --bg-panel: rgba(20, 20, 30, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    
    /* Accent Colors */
    --accent: #00f0ff;
    --accent-glow: rgba(0, 240, 255, 0.4);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    /* Subtle background glow effect */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(138, 43, 226, 0.05), transparent 25%);
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    min-width: 0;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border-right: 1px solid var(--border-glass);
    border-top: none;
    border-bottom: none;
    border-left: none;
    z-index: 10;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header i {
    font-size: 2rem;
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.sidebar-header h2 span {
    color: var(--accent);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    font-weight: 400;
    position: relative;
    overflow: hidden;
}

.nav-section li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-section li.active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent);
    font-weight: 600;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.nav-section li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.chart-filters {
    display: flex;
    gap: 0.5rem;
}

.btn-glow-small {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-glow-small:hover {
    background: rgba(0, 240, 255, 0.1);
    color: white;
}

.btn-glow-small.active {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-glass);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.dot.pulse {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Buttons */
.btn-icon {
    background: transparent;
    border: 1px dashed var(--border-glass);
    color: var(--text-muted);
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 240, 255, 0.05);
}

.btn-glow {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-glow:hover {
    background: var(--accent);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-close:hover {
    color: var(--text-main);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
    border-bottom: 1px solid var(--border-glass);
    border-top: none;
    border-left: none;
    border-right: none;
}

.topbar-right {
    display: flex;
    gap: 1rem;
}

.stat-card.mini {
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
}

.stat-card.mini .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-card.mini .value {
    font-size: 1rem;
    font-weight: 600;
}

/* View System */
.view-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.p-4 { padding: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.w-100 { width: 100%; }

/* Metric Cards */
.metric-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.metric-info h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* Typography Helpers */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-success, .trend-up { color: var(--success); }
.text-danger, .trend-down { color: var(--danger); }
.text-accent { color: var(--accent); }

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.premium-table th {
    text-align: left;
    padding: 0 1rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    white-space: nowrap;
}

.premium-table td {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    white-space: nowrap;
}

.premium-table tbody tr {
    transition: transform 0.2s, background 0.2s;
}

.premium-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.premium-table td:first-child {
    border-radius: 8px 0 0 8px;
    border-left: 1px solid var(--border-glass);
}
.premium-table td:last-child {
    border-radius: 0 8px 8px 0;
    border-right: 1px solid var(--border-glass);
}
.premium-table td {
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

/* Badges */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-sans);
}
.badge-buy { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.badge-sell { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }
.badge-neutral { background: rgba(255,255,255,0.1); color: var(--text-main); border: 1px solid var(--border-glass); }

/* Architecture Visualizer */
.architecture-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.arch-node {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 0 15px var(--accent-glow);
}
.arch-line {
    width: 2px;
    height: 30px;
    background: var(--border-glass);
}
.arch-nodes-bottom {
    display: flex;
    gap: 1rem;
    border-top: 2px solid var(--border-glass);
    padding-top: 20px;
    position: relative;
}
.arch-nodes-bottom::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    width: 2px;
    height: 20px;
    background: var(--border-glass);
}
.arch-node.sub {
    border: 1px solid var(--border-glass);
    background: rgba(0,0,0,0.3);
    color: var(--text-main);
    box-shadow: none;
}

/* Chart */
.chart-container {
    height: 300px;
    width: 100%;
    position: relative;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.glass-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.3s;
}

.glass-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Toggle Switch */
.check-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid var(--border-glass);
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: rgba(0, 240, 255, 0.2);
  border-color: var(--accent);
}
input:checked + .slider:before {
  transform: translateX(22px);
  background-color: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        display: none;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        padding-bottom: 1rem;
    }

    .sidebar.mobile-open {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    .sidebar-nav {
        max-height: 250px;
    }

    .mobile-only {
        display: flex !important;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .view-container {
        padding: 1rem;
    }

    .arch-nodes-bottom {
        flex-direction: column;
    }

    .arch-nodes-bottom::before {
        display: none;
    }
    
    .modal {
        width: 90%;
        padding: 1.5rem;
    }
}
