@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-sky: #dbeafe;
    /* Light blue background */
    --bg-white: #ffffff;
    --text-dark: #0f172a;
    --text-gray: #64748b;
    --accent-blue: #0ea5e9;
    --accent-cyan: #22d3ee;
    --accent-indigo: #3b82f6;

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --shadow-card: 0 10px 30px -10px rgba(14, 165, 233, 0.15);
    --shadow-float: 0 20px 40px -10px rgba(14, 165, 233, 0.25);

    --radius-card: 24px;
    --radius-btn: 16px;

    --font-main: 'Montserrat', sans-serif;
}

[data-theme="dark"] {
    --bg-sky: #0f172a;
    --bg-white: #1e293b;
    --text-dark: #f1f5f9;
    --text-gray: #94a3b8;
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-main);
}

body {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    min-height: 100vh;
    color: var(--text-dark);
    padding-bottom: 100px;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.sky-layout {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* HEADER */
.sky-header {
    background: var(--bg-white);
    padding: 12px 20px;
    border-radius: 20px;
    /* Fully rounded search-bar style */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-card);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.b-grid {
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-radius: 4px;
    box-shadow: 4px 4px white;
}

.brand-info h1 {
    font-size: 14px;
    font-weight: 900;
    color: #0c4a6e;
    letter-spacing: 0.5px;
    line-height: 1;
}

[data-theme="dark"] .brand-info h1 {
    color: white;
}

.badg-max {
    font-size: 9px;
    font-weight: 700;
    color: #0ea5e9;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-btn {
    background: transparent;
    border: none;
    color: #0c4a6e;
    cursor: pointer;
}

[data-theme="dark"] .theme-btn {
    color: white;
}

.theme-btn svg {
    width: 24px;
    height: 24px;
}

.status-pill {
    background: #f0f9ff;
    padding: 6px 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .status-pill {
    background: rgba(255, 255, 255, 0.05);
}

.dot-live {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

.status-pill span {
    font-size: 9px;
    font-weight: 800;
    color: var(--success);
}

/* NAV */
.sky-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.nav-card {
    background: var(--bg-white);
    border: none;
    border-radius: 20px;
    /* Squircle */
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: transform 0.2s;
}

.nav-card:active {
    transform: scale(0.95);
}

.nav-icon {
    color: var(--text-gray);
}

.nav-card span {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-gray);
    text-transform: uppercase;
}

.nav-card.active {
    background: #0ea5e9;
    /* Replaced with solid attractive blue from UI */
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.nav-card.active .nav-icon {
    color: white;
}

.nav-card.active span {
    color: white;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
}

/* VIEWPORT */
.card-white {
    background: var(--bg-white);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}

.active-view {
    display: block;
    animation: slideUp 0.4s ease;
}

.hidden-view {
    display: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TERMINAL COMP */
.search-card {
    padding: 16px;
    margin-bottom: 12px;
}

.search-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    color: var(--text-dark);
}

.chips-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 16px;
    scrollbar-width: none;
}

.chip-solid {
    background: var(--bg-white);
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 11px;
    color: var(--text-dark);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    transition: 0.2s;
}

.chip-solid.active {
    background: var(--text-dark);
    color: white;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.hero-title h2 {
    font-size: 26px;
    font-weight: 900;
    color: #0c4a6e;
    line-height: 1;
}

[data-theme="dark"] .hero-title h2 {
    color: white;
}

.proto-badge {
    font-size: 10px;
    font-weight: 700;
    color: #0ea5e9;
    letter-spacing: 0.5px;
}

.change-pill {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 12px;
}

.change-pill.good {
    background: #d1fae5;
    color: #059669;
}

.change-pill.bad {
    background: #ffe4e6;
    color: #e11d48;
}

.hero-big-price {
    margin-bottom: 24px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.hero-big-price .curr {
    font-size: 28px;
    font-weight: 700;
    color: #0ea5e9;
}

.hero-big-price .val {
    font-size: 56px;
    font-weight: 900;
    color: #0c4a6e;
    letter-spacing: -2px;
}

[data-theme="dark"] .hero-big-price .val {
    color: white;
}

.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.h-stat {
    display: flex;
    flex-direction: column;
}

.h-stat .l {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.h-stat .v {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-dark);
}

.chart-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-top h3 {
    font-size: 11px;
    font-weight: 900;
    color: var(--text-gray);
    text-transform: uppercase;
}

.tf-toggles {
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    display: flex;
}

[data-theme="dark"] .tf-toggles {
    background: rgba(255, 255, 255, 0.1);
}

.tf-t {
    border: none;
    background: transparent;
    font-size: 10px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--text-gray);
    cursor: pointer;
}

.tf-t.active {
    background: var(--bg-white);
    color: var(--text-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chart-embed-area {
    height: 320px;
    border-radius: 16px;
    overflow: hidden;
}

/* ANALYTICS */
.card-head {
    margin-bottom: 20px;
}

.card-head h3 {
    font-size: 11px;
    font-weight: 900;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gauge-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.donut-gauge {
    position: relative;
    width: 140px;
    height: 140px;
}

.donut-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.fg-ring {
    stroke: url(#grad);
    transition: stroke-dashoffset 0.5s ease;
    stroke-linecap: round;
}

.donut-display {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.d-val {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-dark);
}

.fg-status {
    font-size: 16px;
    font-weight: 900;
    color: #0ea5e9;
    margin-top: 12px;
}

.fg-sub {
    font-size: 10px;
    color: var(--text-gray);
    margin-top: 4px;
}

.rsi-body {
    padding: 10px 0;
}

.rsi-bar-track {
    height: 16px;
    background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
    border-radius: 50px;
    position: relative;
    margin-bottom: 12px;
}

.rsi-cursor {
    width: 24px;
    height: 24px;
    background: white;
    border: 4px solid #0ea5e9;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.rsi-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-gray);
}

.algo-badge-area {
    text-align: center;
    margin-bottom: 24px;
}

.badge-pill {
    display: inline-block;
    background: #0f172a;
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 14px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.3);
}

.algo-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.a-bar .l {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-dark);
    display: block;
    margin-bottom: 6px;
}

.b-track {
    height: 24px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
}

[data-theme="dark"] .b-track {
    background: rgba(255, 255, 255, 0.05);
}

.b-fill {
    height: 100%;
}

.b-fill.green {
    background: #a7f3d0;
    border-right: 3px solid #10b981;
}

.b-fill.yellow {
    background: #fde68a;
    border-right: 3px solid #f59e0b;
}

.b-fill.red {
    background: #fecaca;
    border-right: 3px solid #ef4444;
}

.heat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.h-cell {
    aspect-ratio: 1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    font-size: 9px;
}

/* TRADING DEPO */
.calc-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.c-grp.full {
    grid-column: span 2;
}

.c-grp label {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-gray);
    margin-bottom: 8px;
    display: block;
}

.c-grp input {
    width: 100%;
    padding: 16px;
    background: #f1f5f9;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

[data-theme="dark"] .c-grp input {
    background: rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-calc-main {
    width: 100%;
    padding: 18px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
    transition: transform 0.2s;
}

.btn-calc-main:active {
    transform: scale(0.98);
}

.calc-results-row {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

.res-box {
    text-align: center;
    flex: 1;
}

.res-box .l {
    display: block;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-gray);
    margin-bottom: 4px;
}

.res-box .v {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
}

[data-theme="dark"] .res-box .v {
    color: white;
}

.lvl-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lvl-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 20px;
    background: #fff1f2;
    border-radius: 12px;
    color: #e11d48;
    font-weight: 800;
    font-size: 12px;
}

.lvl-row.g {
    background: #ecfdf5;
    color: #059669;
}

.lvl-row.b {
    background: #0f172a;
    color: white;
}

/* MARKETS LIST */
.list-container {
    margin-bottom: 20px;
}

.list-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-gray);
    margin-bottom: 12px;
    text-transform: uppercase;
    padding-left: 8px;
}

.stack-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.m-item {
    background: var(--bg-white);
    padding: 16px 20px;
    border-radius: 50px;
    /* Pill Shape */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.m-sym {
    font-weight: 900;
    font-size: 14px;
    color: #0c4a6e;
}

[data-theme="dark"] .m-sym {
    color: white;
}

.m-pct {
    font-weight: 800;
    font-size: 13px;
}

.m-pct.pos {
    color: #10b981;
}

.m-pct.neg {
    color: #ef4444;
}

.card-head.split {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-outline-sm {
    border: 2px solid #0ea5e9;
    color: #0ea5e9;
    background: transparent;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.sig-row {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sig-left {
    display: flex;
    flex-direction: column;
}

.s-coin {
    font-weight: 900;
    font-size: 14px;
    color: #0f172a;
}

[data-theme="dark"] .s-coin {
    color: white;
}

.s-type {
    font-size: 10px;
    font-weight: 800;
}

/* FLOATING STATUS */
.float-status-bar {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    background: white;
    padding: 16px 24px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 440px;
    margin: 0 auto;
}

[data-theme="dark"] .float-status-bar {
    background: #1e293b;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #d1fae5;
}

.status-inf {
    display: flex;
    flex-direction: column;
}

.s-main {
    font-weight: 900;
    font-size: 12px;
    color: #0c4a6e;
    text-transform: uppercase;
}

[data-theme="dark"] .s-main {
    color: white;
}

.s-sub {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-gray);
}

.mt-4 {
    margin-top: 16px;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    /* hidden by default */
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    width: 100%;
    max-width: 420px;
    border-radius: 32px;
    padding: 6px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px 10px 24px;
}

.modal-title h2 {
    font-size: 20px;
    font-weight: 900;
    color: #0c4a6e;
    line-height: 1;
}

[data-theme="dark"] .modal-title h2 {
    color: white;
}

.modal-price {
    font-size: 14px;
    font-weight: 700;
    color: #0ea5e9;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: var(--text-dark);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

[data-theme="dark"] .modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-chart-area {
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    /* Loader bg */
}

.modal-actions {
    padding: 10px 20px 20px 20px;
}

.btn-trade {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUpModal {
    from {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
/* SIGNALS BEAUTIFICATION */
.signals-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sig-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.03);
}

[data-theme="dark"] .sig-card {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}

.sig-card:hover {
    transform: translateY(-2px);
    background: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

[data-theme="dark"] .sig-card:hover {
    background: rgba(255,255,255,0.06);
}

.sig-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sig-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sig-icon-box.pos {
    background: #dcfce7;
    color: #16a34a;
}
.sig-icon-box.neg {
    background: #fee2e2;
    color: #dc2626;
}

[data-theme="dark"] .sig-icon-box.pos { background: rgba(22, 163, 74, 0.2); }
[data-theme="dark"] .sig-icon-box.neg { background: rgba(220, 38, 38, 0.2); }

.sig-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sig-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sig-pair {
    font-weight: 800;
    font-size: 14px;
    color: var(--text-dark);
}

.tier-pill {
    font-size: 8px;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.sig-meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-gray);
}

.sig-stat {
    text-align: right;
}

.sig-val {
    font-size: 18px;
    font-weight: 900;
}

.sig-val.pos { color: #10b981; }
.sig-val.neg { color: #ef4444; }

.empty-plch {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.6;
}
