:root {
    --bg: #07131f;
    --bg-2: #0d1b2b;
    --panel: #0f1f2d;
    --panel-strong: #111f2d;
    --panel-soft: #17263a;
    --border: rgba(169, 184, 205, 0.18);
    --text: #f4f8ff;
    --text-soft: #a9b8ce;
    --text-muted: #7d8ea8;
    --green: #2be8a0;
    --red: #ff4d6d;
    --blue: #4f7cff;
    --blue-2: #5ab6ff;
    --shadow: rgba(0, 0, 0, 0.35);
    --glow: rgba(79, 124, 255, 0.26);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(79, 124, 255, 0.14), transparent 26%),
        radial-gradient(circle at bottom right, rgba(43, 232, 160, 0.14), transparent 28%),
        var(--bg);
    color: var(--text);
}

body {
    min-height: 100vh;
}

button {
    font: inherit;
}

.app-shell {
    display: flex;
    width: min(100%, 1480px);
    min-height: 100vh;
    margin: 0 auto;
    background: linear-gradient(180deg, #091723 0%, #0d1d30 100%);
    position: relative;
    overflow: hidden;
}

.app-shell::before,
.app-shell::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.5;
}

.app-shell::before {
    width: 360px;
    height: 360px;
    background: rgba(79, 124, 255, 0.14);
    top: -140px;
    right: 10%;
}

.app-shell::after {
    width: 420px;
    height: 420px;
    background: rgba(43, 232, 160, 0.12);
    bottom: -160px;
    left: 18%;
}

.sidebar {
    width: min(290px, 28vw);
    min-width: 210px;
    background: rgba(13, 25, 38, 0.96);
    border-right: 1px solid var(--border);
    padding: 18px 18px 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 12px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(43, 232, 160, 0.2), rgba(79, 124, 255, 0.24));
    box-shadow: 0 0 24px rgba(79, 124, 255, 0.2);
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
}

.brand-title {
    font-size: 22px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: white;
    background: linear-gradient(90deg, #e9f4ff 0%, #8cc9ff 32%, #38d7af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub {
    margin-top: 4px;
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--text-soft);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
    padding: 0 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    color: var(--text-soft);
    border-radius: 12px;
    padding: 12px 14px;
    width: 100%;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-item:hover {
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
}

.nav-item.active {
    background: rgba(80, 127, 255, 0.18);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(79, 124, 255, 0.18), 0 4px 16px rgba(79, 124, 255, 0.1);
}

.view-panel {
    display: none;
    animation: fadeIn 0.28s ease;
}

.view-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0 20px;
}

.panel-header h2 {
    margin: 0;
    font-size: 28px;
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 12px;
    border: 1px solid transparent;
}

.panel-badge.positive {
    background: rgba(43, 232, 160, 0.12);
    color: var(--green);
    border-color: rgba(43, 232, 160, 0.28);
}

.panel-badge.negative {
    background: rgba(255, 77, 109, 0.12);
    color: var(--red);
    border-color: rgba(255, 77, 109, 0.28);
}

.panel-badge.neutral {
    background: rgba(79, 124, 255, 0.12);
    color: #9ec0ff;
    border-color: rgba(79, 124, 255, 0.28);
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.analysis-card {
    background: rgba(16, 28, 41, 0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
}

.analysis-card h3 {
    margin: 0 0 14px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
}

.panel-list,
.feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.panel-list li,
.feature-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.panel-list li span,
.feature-list li {
    font-size: 14px;
}

.panel-list li strong,
.feature-list li strong {
    font-weight: 800;
}

.feature-list li {
    justify-content: space-between;
}

.analysis-table-wrap {
    background: rgba(16, 28, 41, 0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
}

.analysis-table th,
.analysis-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.analysis-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-soft);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.analysis-table td {
    color: var(--text);
    font-weight: 600;
}

.analysis-table td.up {
    color: var(--green);
}

.analysis-table td.down {
    color: var(--red);
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 12px currentColor;
}

.dot.green,
.legend-dot.green {
    background: var(--green);
    color: var(--green);
}

.dot.red,
.legend-dot.red {
    background: var(--red);
    color: var(--red);
}

.user-panel {
    margin-top: auto;
    background: rgba(79, 124, 255, 0.12);
    border: 1px solid rgba(79, 124, 255, 0.18);
    border-radius: 11px;
    padding: 12px 14px;
    color: var(--text);
}

.user-email {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-plan {
    margin-top: 4px;
    color: #73d4ff;
    font-size: 13px;
    font-weight: 600;
}

.logout-btn {
    margin-top: 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(180deg, #f2f7ff 0%, #dde9ff 100%);
    color: #0e1624;
    font-size: 18px;
    font-weight: 700;
    padding: 14px 18px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(255, 255, 255, 0.12);
}

.trial-btn {
    margin-top: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2be8a0, #12b57a);
    color: #041319;
    font-size: 15px;
    font-weight: 800;
    padding: 14px 16px;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(43, 232, 160, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trial-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(43, 232, 160, 0.3);
}

.trial-btn:disabled {
    opacity: 0.8;
    cursor: wait;
}

.sidebar-warning {
    color: var(--text-muted);
    margin-top: 18px;
    font-size: 12px;
    line-height: 1.5;
    padding-left: 8px;
}

.main-panel {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 22px 26px 28px;
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 14px 8px 20px;
}

.launch-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.18), rgba(43, 232, 160, 0.12));
    border: 1px solid rgba(79, 124, 255, 0.22);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 10px 24px rgba(10, 17, 28, 0.24);
    margin: 0 8px 18px;
}

.launch-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.beta-chip {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(43, 232, 160, 0.12);
    color: var(--green);
    border: 1px solid rgba(43, 232, 160, 0.22);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.launch-banner h2 {
    margin: 0;
    font-size: clamp(24px, 2.2vw, 32px);
    line-height: 1.1;
    color: #edf5ff;
}

.launch-banner p {
    margin: 0;
    max-width: 520px;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.6;
}

.title-block h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.1;
    font-weight: 800;
    color: #edf5ff;
}

.title-block p {
    margin: 8px 0 0;
    font-size: 16px;
    color: var(--text-soft);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.market-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-soft);
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    background: var(--green);
    box-shadow: 0 0 12px rgba(43, 232, 160, 0.9);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.75; }
}

.next-scan {
    color: var(--text-soft);
    font-size: 15px;
}

.scan-btn {
    border: none;
    background: linear-gradient(135deg, #4f7cff, #3b68ea);
    color: white;
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 20px rgba(79, 124, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scan-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(79, 124, 255, 0.32);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 18px;
}

.metric-card {
    background: rgba(16, 28, 41, 0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    min-height: 180px;
    padding: 24px 18px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 14px 24px var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32);
}

.rising-card {
    background: linear-gradient(180deg, rgba(14, 49, 44, 0.82), rgba(16, 28, 41, 0.94));
    border-color: rgba(43, 232, 160, 0.24);
}

.falling-card {
    background: linear-gradient(180deg, rgba(56, 17, 27, 0.78), rgba(16, 28, 41, 0.94));
    border-color: rgba(255, 77, 109, 0.24);
}

.total-card {
    background: linear-gradient(180deg, rgba(12, 19, 28, 0.86), rgba(16, 28, 41, 0.96));
}

.metric-label {
    margin-bottom: 12px;
    color: var(--text-soft);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.metric-value {
    font-size: clamp(42px, 3vw, 72px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.06em;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
}

.rising-value {
    color: var(--green);
}

.falling-value {
    color: var(--red);
}

.total-value {
    color: #edf5ff;
    font-size: clamp(54px, 3vw, 86px);
}

.metric-caption {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-soft);
}

.market-direction-panel {
    margin-top: 26px;
    background: rgba(16, 28, 41, 0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 20px 18px;
    box-shadow: 0 14px 24px var(--shadow);
}

.market-direction-panel h2 {
    margin: 0 0 20px;
    font-size: 27px;
    font-weight: 800;
    color: #edf5ff;
}

.direction-label {
    font-size: 20px;
    color: var(--text-soft);
    margin-bottom: 12px;
}

.direction-meter {
    display: flex;
    width: 100%;
    height: 64px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.direction-fill {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: white;
    min-width: 0;
    transition: width 0.6s ease;
}

.rising-fill {
    background: linear-gradient(90deg, #2ce5a4, #1dc891);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.08);
}

.falling-fill {
    background: linear-gradient(90deg, #ff4d6d, #ef385a);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.08);
}

.direction-legend {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 16px;
    color: var(--text-soft);
    font-size: 14px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.trend-graph-panel {
    margin-top: 26px;
    background: rgba(16, 28, 41, 0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 14px 24px var(--shadow);
}

.graph-header {
    margin-top: 0;
    margin-bottom: 16px;
}

.chart-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 12px;
}

.chart-meta strong {
    color: var(--text);
    font-size: 18px;
}

.trend-chart {
    width: 100%;
    height: 220px;
    display: block;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(79, 124, 255, 0.06), rgba(15, 31, 45, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.trend-line {
    stroke: #5ab6ff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trend-area {
    opacity: 0.7;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.market-summary-panel {
    margin-top: 26px;
    background: rgba(16, 28, 41, 0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 14px 24px var(--shadow);
}

.summary-header {
    margin-top: 0;
    margin-bottom: 18px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px 18px;
}

.summary-card h3 {
    margin: 0 0 12px;
    color: var(--text-soft);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.summary-card p {
    margin: 0;
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
}

.mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.mini-list li {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(79, 124, 255, 0.06);
    border: 1px solid rgba(79, 124, 255, 0.15);
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.5;
}

.premium-panel {
    margin-top: 26px;
    background: rgba(16, 28, 41, 0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 14px 24px var(--shadow);
}

.premium-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.premium-header h2 {
    margin: 0;
    font-size: 28px;
}

.premium-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 18px;
}

.trust-card,
.sector-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px 18px;
}

.trust-score-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.trust-score {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(43, 232, 160, 0.16), rgba(79, 124, 255, 0.2));
    border: 1px solid rgba(79, 124, 255, 0.24);
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
}

.trust-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trust-copy strong {
    color: var(--text-soft);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 11px;
}

.trust-copy span {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
}

.trust-bar {
    margin-top: 20px;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.trust-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2be8a0, #5ab6ff, #ffd166);
    transition: width 0.35s ease;
}

.sector-card h3 {
    margin: 0 0 14px;
    color: var(--text-soft);
    letter-spacing: 0.08em;
    font-size: 14px;
    text-transform: uppercase;
}

.sector-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.sector-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.sector-list li strong.positive { color: var(--green); }
.sector-list li strong.negative { color: var(--red); }
.sector-list li strong.neutral { color: var(--text-soft); }

.ticker-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.ticker-column {
    background: rgba(15, 31, 45, 0.85);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 18px 10px;
    box-shadow: 0 14px 28px rgba(5, 10, 18, 0.25);
}

.ticker-column h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.ticker-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.ticker-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 15px;
}

.ticker-list li span {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ticker-list li em {
    font-style: normal;
    font-weight: 700;
}

.rising-column .ticker-list li em {
    color: var(--green);
}

.falling-column .ticker-list li em {
    color: var(--red);
}

.ticker-list .empty {
    justify-content: center;
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 1200px) {
    .sidebar {
        width: 240px;
    }

    .main-panel {
        padding: 18px 18px 20px;
    }

    .title-block h1 {
        font-size: 28px;
    }

    .metric-value {
        font-size: clamp(36px, 2.8vw, 56px);
    }
}

@media (max-width: 980px) {
    .sidebar {
        width: 220px;
    }

    .content-grid,
    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .topbar,
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 680px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .main-panel {
        padding: 16px 12px 24px;
    }

    .title-block h1 {
        font-size: 32px;
    }

    .topbar-actions {
        flex-wrap: wrap;
    }

    .ticker-breakdown {
        grid-template-columns: 1fr;
    }

    .scan-btn {
        width: 100%;
    }

    .analysis-table th,
    .analysis-table td {
        padding: 10px 12px;
    }
}

