:root {
        --safe-top: 0px;
        --safe-right: 0px;
        --safe-bottom: 0px;
        --safe-left: 0px;
        --content-safe-top: 0px;
        --content-safe-right: 0px;
        --content-safe-bottom: 0px;
        --content-safe-left: 0px;
        --app-safe-top: 0px;
        --app-safe-bottom: 0px;
        --telegram-controls-top-gap: 0px;
        --ink: #101820;
        --muted: #66737d;
        --line: #dbe3e8;
        --panel: #ffffff;
        --soft: #eef3f5;
        --green: #2f7d32;
        --blue: #267a96;
        color: var(--ink);
        background: #f4f7f8;
        font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      }

      * {
        box-sizing: border-box;
      }

      html,
      body,
      #root {
        min-height: 100%;
        margin: 0;
      }

      body {
        min-height: 100vh;
        min-height: 100dvh;
        background: #f4f7f8;
        letter-spacing: 0;
      }

      button,
      select {
        font: inherit;
      }

      .app-shell {
        min-height: 100vh;
        min-height: 100dvh;
        width: 100%;
        margin: 0 auto;
        background: #f4f7f8;
        padding:
          calc(12px + var(--app-safe-top) + var(--telegram-controls-top-gap))
          calc(14px + var(--safe-right) + var(--content-safe-right))
          calc(86px + var(--app-safe-bottom))
          calc(14px + var(--safe-left) + var(--content-safe-left));
      }

      body.mobile .app-shell {
        --telegram-controls-top-gap: 30px;
      }

      body.desktop .app-shell {
        max-width: 480px;
        min-height: min(760px, 100vh);
        padding: 18px 18px 104px;
        border-left: 1px solid var(--line);
        border-right: 1px solid var(--line);
        box-shadow: 0 24px 80px rgba(16, 24, 32, 0.12);
      }

      .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 64px;
        margin-bottom: 14px;
      }

      .brand {
        display: flex;
        align-items: center;
        min-width: 0;
      }

      .brand-logo-img {
        display: block;
        width: min(178px, calc(100vw - 190px));
        height: auto;
        max-height: 58px;
        object-fit: contain;
      }

      .brand-mark {
        position: relative;
        width: 46px;
        height: 54px;
        flex: 0 0 46px;
      }

      .brand-mark::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 38px;
        height: 34px;
        border-radius: 0 0 0 34px;
        background: #050607;
      }

      .brand-mark::after {
        content: "";
        position: absolute;
        left: 20px;
        bottom: 2px;
        width: 24px;
        height: 24px;
        background: #050607;
      }

      .brand-title {
        display: grid;
        gap: 0;
        min-width: 0;
      }

      .brand-title strong {
        display: grid;
        gap: 0;
        font-size: 29px;
        line-height: 0.82;
        font-weight: 820;
        white-space: nowrap;
      }

      .brand-title .brand-word {
        color: inherit;
        font-size: inherit;
        letter-spacing: 0;
        margin-top: 0;
        padding-left: 0;
        text-transform: none;
      }

      .brand-title span {
        color: var(--muted);
        font-size: 7px;
        text-transform: uppercase;
        letter-spacing: 0.48em;
        padding-left: 2px;
        margin-top: 4px;
      }

      .profile-chip {
        min-width: 0;
        max-width: 116px;
        border: 1px solid var(--line);
        border-radius: 999px;
        padding: 8px 10px;
        color: #2f3b45;
        background: rgba(255, 255, 255, 0.78);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
      }

      .header-language-wrap {
        position: relative;
        z-index: 20;
      }

      .header-language {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.82);
        color: #101820;
        padding: 7px 10px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 760;
        box-shadow: 0 10px 24px rgba(16, 24, 32, 0.05);
        transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
      }

      .header-language:hover {
        border-color: rgba(47, 125, 50, 0.34);
        box-shadow: 0 12px 26px rgba(47, 125, 50, 0.08);
      }

      .header-language:active {
        transform: translateY(1px);
      }

      .header-language[disabled] {
        opacity: 0.62;
        cursor: wait;
      }

      .header-language-menu {
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        min-width: 172px;
        display: grid;
        gap: 4px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.98);
        padding: 6px;
        box-shadow: 0 18px 44px rgba(16, 24, 32, 0.16);
        backdrop-filter: blur(14px);
      }

      .header-language-option {
        min-height: 38px;
        display: flex;
        align-items: center;
        gap: 9px;
        border: 0;
        border-radius: 7px;
        background: transparent;
        color: #101820;
        padding: 8px 10px;
        text-align: left;
        cursor: pointer;
        font-size: 13px;
      }

      .header-language-option.active {
        background: #e7f3ed;
        color: var(--green);
        font-weight: 820;
      }

      .header-language-option[disabled] {
        opacity: 0.62;
        cursor: wait;
      }

      [dir="rtl"] .header-language-menu {
        left: 0;
        right: auto;
      }

      .screen {
        display: grid;
        gap: 12px;
      }

      .hero-panel,
      .card,
      .state-card {
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--panel);
        box-shadow: 0 14px 38px rgba(16, 24, 32, 0.06);
      }

      .hero-panel {
        padding: 16px 18px;
        min-height: 150px;
        display: grid;
        align-content: center;
        gap: 16px;
        overflow: hidden;
        position: relative;
        background: linear-gradient(135deg, #ffffff 0%, #f8fbfc 48%, #edf5f7 100%);
      }

      .hero-panel::after {
        content: "";
        position: absolute;
        right: -46px;
        bottom: -60px;
        width: 180px;
        height: 180px;
        border: 22px solid rgba(16, 24, 32, 0.06);
        border-radius: 50%;
      }

      .hero-panel::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 5px;
        height: 100%;
        background: linear-gradient(180deg, var(--blue), var(--green));
      }

      .hero-panel > * {
        position: relative;
        z-index: 1;
      }

      .eyebrow {
        color: var(--blue);
        font-size: 12px;
        font-weight: 760;
        text-transform: uppercase;
      }

      h1,
      h2,
      h3,
      p {
        margin: 0;
      }

      h1 {
        margin-top: 8px;
        max-width: 300px;
        font-size: 28px;
        line-height: 1.08;
        font-weight: 860;
      }

      h2 {
        font-size: 22px;
        line-height: 1.15;
        font-weight: 820;
      }

      h3 {
        font-size: 16px;
        line-height: 1.2;
        font-weight: 780;
      }

      p {
        color: var(--muted);
        line-height: 1.5;
      }

      .card {
        padding: 16px;
        display: grid;
        gap: 12px;
      }

      .metric-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
      }

      .metric {
        border: 1px solid #e0e8ed;
        border-radius: 8px;
        background: #f8fbfc;
        padding: 12px;
        min-height: 76px;
        text-align: left;
      }

      .metric span {
        display: block;
        color: var(--muted);
        font-size: 12px;
        margin-bottom: 6px;
      }

      .metric strong {
        display: block;
        font-size: 20px;
        line-height: 1.15;
      }

      .market-card {
        position: relative;
        overflow: hidden;
        min-height: 116px;
        display: grid;
        grid-template-rows: auto 1fr;
        align-content: stretch;
        gap: 12px;
        cursor: pointer;
        transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
      }

      .market-card::after {
        content: "";
        position: absolute;
        right: -28px;
        bottom: -34px;
        width: 92px;
        height: 92px;
        border: 15px solid rgba(38, 122, 150, 0.08);
        border-radius: 50%;
      }

      .market-card > * {
        position: relative;
        z-index: 1;
      }

      .market-card strong {
        font-size: 26px;
        letter-spacing: 0;
        min-height: 30px;
        display: flex;
        align-items: flex-end;
      }

      .market-card p {
        font-size: 13px;
        line-height: 1.35;
        margin-top: 4px;
      }

      .market-kicker {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }

      .market-badge {
        border-radius: 999px;
        background: #e7f3ed;
        color: var(--green);
        padding: 5px 8px;
        font-size: 11px;
        font-weight: 820;
        white-space: nowrap;
      }

      .market-card:hover {
        border-color: #267a96;
        box-shadow: 0 10px 26px rgba(38, 122, 150, 0.12);
        transform: translateY(-1px);
      }

      .market-card:active {
        transform: translateY(0);
      }

      .pair-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .back-button {
        min-height: 38px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
        color: #23313b;
        padding: 8px 12px;
        cursor: pointer;
        font-weight: 760;
      }

      .pair-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      .pair-card {
        width: 100%;
        min-height: 86px;
        display: grid;
        gap: 9px;
        align-content: space-between;
        border: 1px solid #e0e8ed;
        border-radius: 8px;
        background: #ffffff;
        color: var(--ink);
        padding: 10px;
        text-align: left;
        cursor: pointer;
        transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
      }

      .pair-card:hover {
        border-color: rgba(38, 122, 150, 0.45);
        box-shadow: 0 10px 22px rgba(16, 24, 32, 0.08);
        transform: translateY(-1px);
      }

      .pair-card:active {
        transform: translateY(0);
      }

      .pair-name {
        min-width: 0;
        font-size: 15px;
        font-weight: 820;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .pair-payout {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        min-width: 50px;
        border-radius: 999px;
        background: #e7f3ed;
        color: var(--green);
        font-size: 12px;
        font-weight: 820;
        padding: 6px 9px;
        white-space: nowrap;
      }

      .expiry-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
      }

      .expiry-button {
        min-height: 66px;
        border: 1px solid #dce7ec;
        border-radius: 8px;
        background: #f8fbfc;
        color: var(--ink);
        cursor: pointer;
        display: grid;
        gap: 4px;
        align-content: center;
        text-align: center;
      }

      .expiry-button strong {
        font-size: 21px;
        line-height: 1;
      }

      .analysis-card {
        border-color: rgba(38, 122, 150, 0.22);
        background: linear-gradient(180deg, #ffffff 0%, #f5fbfd 100%);
      }

      .signal-loader-card {
        min-height: calc(100vh - 210px - var(--app-safe-top) - var(--app-safe-bottom));
        min-height: calc(100dvh - 210px - var(--app-safe-top) - var(--app-safe-bottom));
        display: grid;
        place-items: center;
        text-align: center;
        padding: 24px 18px;
        overflow: hidden;
        position: relative;
      }

      .signal-loader-card::after {
        content: "";
        position: absolute;
        right: -70px;
        bottom: -80px;
        width: 190px;
        height: 190px;
        border: 24px solid rgba(16, 24, 32, 0.055);
        border-radius: 50%;
      }

      .signal-loader-content {
        position: relative;
        z-index: 1;
        display: grid;
        justify-items: center;
        gap: 16px;
        width: 100%;
      }

      .lottie-loader {
        width: min(230px, 72vw);
        aspect-ratio: 1;
      }

      .signal-loader-text {
        display: grid;
        gap: 8px;
      }

      .signal-loader-text h2 {
        font-size: 26px;
      }

      .signal-loader-status {
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid rgba(47, 125, 50, 0.18);
        border-radius: 999px;
        background: #e7f3ed;
        color: var(--green);
        padding: 7px 11px;
        font-size: 13px;
        font-weight: 820;
      }

      .signal-loader-status::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: currentColor;
        box-shadow: 0 0 0 4px rgba(47, 125, 50, 0.12);
        animation: signalStatusPulse 1.05s ease-in-out infinite;
      }

      .analysis-steps {
        display: grid;
        gap: 8px;
      }

      .analysis-step {
        display: flex;
        align-items: center;
        gap: 9px;
        color: #42515c;
        font-size: 14px;
      }

      .analysis-dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--blue);
        box-shadow: 0 0 0 5px rgba(38, 122, 150, 0.12);
      }

      .signal-card {
        position: relative;
        overflow: hidden;
        border: 1px solid rgba(134, 213, 232, 0.2);
        background:
          radial-gradient(circle at 78% 8%, rgba(134, 213, 232, 0.16), transparent 34%),
          linear-gradient(145deg, rgba(38, 122, 150, 0.22) 0%, rgba(16, 24, 32, 0) 44%),
          #101820;
        color: #ffffff;
        box-shadow: 0 24px 58px rgba(16, 24, 32, 0.2);
      }

      .signal-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 5px;
        height: 100%;
        background: linear-gradient(180deg, var(--blue), var(--green));
      }

      .signal-card::after {
        content: "";
        position: absolute;
        right: -58px;
        top: -70px;
        width: 172px;
        height: 172px;
        border-radius: 50%;
        border: 24px solid rgba(47, 125, 50, 0.1);
      }

      .signal-card.sell::after {
        border-color: rgba(178, 54, 54, 0.13);
      }

      .signal-card .eyebrow {
        color: #86d5e8;
      }

      .signal-card p {
        color: #b7c8d4;
      }

      .signal-top {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .signal-top h2 {
        font-size: 24px;
        line-height: 1.02;
      }

      .direction-badge {
        min-width: 82px;
        min-height: 42px;
        border-radius: 8px;
        display: inline-grid;
        place-items: center;
        color: #fff;
        font-size: 18px;
        font-weight: 860;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
      }

      .direction-badge.buy {
        background: linear-gradient(135deg, #3ea34a, var(--green));
      }

      .direction-badge.sell {
        background: linear-gradient(135deg, #d54b4b, #b23636);
      }

      .signal-visual {
        position: relative;
        z-index: 1;
        min-height: 170px;
        border: 1px solid rgba(134, 213, 232, 0.18);
        border-radius: 8px;
        background:
          radial-gradient(circle at 50% 16%, rgba(134, 213, 232, 0.15), transparent 48%),
          linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
        display: grid;
        place-items: center;
        text-align: center;
        padding: 18px;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
      }

      .signal-chart {
        width: min(190px, 78%);
        height: auto;
        filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.26));
      }

      .signal-chart path,
      .signal-chart polyline {
        stroke: var(--green);
      }

      .signal-card.sell .signal-chart path,
      .signal-card.sell .signal-chart polyline {
        stroke: #ef5350;
      }

      .signal-callout {
        display: grid;
        gap: 2px;
        margin-top: -10px;
      }

      .signal-callout span {
        color: #b7c8d4;
        font-size: 12px;
        font-weight: 760;
      }

      .signal-callout strong {
        color: #ffffff;
        font-size: 22px;
        line-height: 1;
      }

      .signal-meta {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
      }

      .signal-meta.open {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .signal-meta-item {
        border: 1px solid rgba(134, 213, 232, 0.18);
        border-radius: 8px;
        padding: 11px;
        background:
          linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
      }

      .signal-meta-item span {
        display: block;
        color: #9eb3c1;
        font-size: 12px;
        margin-bottom: 4px;
      }

      .signal-meta-item strong {
        font-size: 18px;
        color: #ffffff;
      }

      .result-banner {
        position: relative;
        z-index: 1;
        min-height: 48px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px;
        font-weight: 820;
      }

      .result-banner .back-button {
        background: rgba(255, 255, 255, 0.9);
      }

      .result-banner.win {
        background: #e7f3ed;
        color: var(--green);
      }

      .result-banner.loss {
        background: #f8e9e9;
        color: #b23636;
      }

      .result-banner.draw {
        background: #eef3f5;
        color: #42515c;
      }

      .signal-action-row {
        display: grid;
        gap: 8px;
      }

      .signal-action-button {
        min-height: 44px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
        color: #101820;
        font-size: 15px;
        font-weight: 820;
        cursor: pointer;
        box-shadow: 0 10px 24px rgba(16, 24, 32, 0.05);
      }

      .signal-action-button.primary {
        border-color: rgba(47, 125, 50, 0.2);
        background: var(--green);
        color: #ffffff;
      }

      .signal-list {
        display: grid;
        gap: 10px;
      }

      .active-preview-card {
        min-height: 84px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        border: 1px solid #dce7ec;
        border-radius: 8px;
        background: #ffffff;
        padding: 12px;
        box-shadow: 0 10px 24px rgba(16, 24, 32, 0.055);
      }

      .active-preview-main {
        min-width: 0;
        display: grid;
        gap: 6px;
      }

      .active-preview-main h3 {
        font-size: 19px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .active-preview-meta {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 7px;
      }

      .mini-direction {
        border-radius: 999px;
        color: #ffffff;
        padding: 6px 9px;
        font-size: 12px;
        font-weight: 860;
        line-height: 1;
      }

      .mini-direction.buy {
        background: var(--green);
      }

      .mini-direction.sell {
        background: #b23636;
      }

      .mini-countdown {
        color: var(--muted);
        font-size: 12px;
        font-weight: 760;
      }

      .empty-signals {
        min-height: 150px;
        display: grid;
        place-items: center;
        overflow: hidden;
        opacity: 0.84;
      }

      .empty-signals .lottie-loader {
        width: min(190px, 50vw);
      }

      .section-heading {
        display: grid;
        gap: 6px;
        margin-top: 4px;
      }

      .section-heading h2 {
        font-size: 26px;
        line-height: 1.05;
      }

      .section-heading p {
        font-size: 14px;
      }

      .signal-item {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        align-items: center;
        border: 1px solid #e0e8ed;
        border-radius: 8px;
        background: #f8fbfc;
        padding: 12px;
      }

      .signal-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        display: grid;
        place-items: center;
        background: #101820;
        color: #fff;
      }

      .tag {
        border-radius: 999px;
        background: #e7f3ed;
        color: var(--green);
        font-size: 12px;
        font-weight: 760;
        padding: 6px 9px;
        white-space: nowrap;
      }

      .history-line {
        position: relative;
        overflow: hidden;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 12px 12px 12px 16px;
        border: 1px solid #e0e8ed;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 8px 22px rgba(16, 24, 32, 0.045);
      }

      .history-line::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        height: 100%;
        background: #c8d2d8;
      }

      .history-line.win {
        border-color: rgba(47, 125, 50, 0.72);
        background: linear-gradient(90deg, rgba(47, 125, 50, 0.1), #ffffff 42%);
        box-shadow: 0 10px 26px rgba(47, 125, 50, 0.13);
      }

      .history-line.win::before {
        background: var(--green);
      }

      .history-line.loss {
        border-color: rgba(178, 54, 54, 0.72);
        background: linear-gradient(90deg, rgba(178, 54, 54, 0.1), #ffffff 42%);
        box-shadow: 0 10px 26px rgba(178, 54, 54, 0.13);
      }

      .history-line.loss::before {
        background: #b23636;
      }

      .history-line.draw {
        border-color: rgba(93, 108, 118, 0.6);
        background: linear-gradient(90deg, rgba(93, 108, 118, 0.09), #ffffff 42%);
      }

      .history-line.draw::before {
        background: #7c8b94;
      }

      .history-detail {
        min-width: 0;
        display: grid;
        gap: 6px;
      }

      .history-detail h3 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .history-values {
        display: grid;
        gap: 3px;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.28;
      }

      .history-values strong {
        color: var(--ink);
        font-weight: 820;
      }

      .history-result {
        width: fit-content;
        border-radius: 999px;
        background: #eef3f5;
        color: #5d6c76;
        font-size: 12px;
        font-weight: 820;
        padding: 6px 9px;
      }

      .history-result.win {
        background: #e7f3ed;
        color: var(--green);
      }

      .history-result.loss {
        background: #f8e9e9;
        color: #b23636;
      }

      .history-result-main {
        min-width: 82px;
        min-height: 42px;
        border-radius: 8px;
        display: inline-grid;
        place-items: center;
        color: #ffffff;
        font-size: 15px;
        font-weight: 860;
        box-shadow: 0 12px 22px rgba(16, 24, 32, 0.13);
      }

      .history-result-main.win {
        background: linear-gradient(135deg, #3ea34a, var(--green));
      }

      .history-result-main.loss {
        background: linear-gradient(135deg, #d54b4b, #b23636);
      }

      .history-result-main.draw {
        background: linear-gradient(135deg, #8b9aa3, #63717b);
      }

      .history-direction {
        width: fit-content;
        border-radius: 999px;
        background: #eef3f5;
        color: #17202a;
        font-size: 12px;
        font-weight: 820;
        padding: 5px 9px;
      }

      .history-direction.buy {
        background: #e7f3ed;
        color: var(--green);
      }

      .history-direction.sell {
        background: #f8e9e9;
        color: #b23636;
      }

      .profile-grid {
        display: grid;
        gap: 10px;
      }

      .profile-row {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        border-bottom: 1px solid #e6edf1;
        padding-bottom: 10px;
      }

      .profile-row:last-child {
        border-bottom: 0;
        padding-bottom: 0;
      }

      .profile-row span {
        color: var(--muted);
      }

      .profile-hero {
        display: grid;
        gap: 16px;
        overflow: hidden;
        position: relative;
        background:
          linear-gradient(135deg, #ffffff 0%, #f8fbfc 52%, #edf5f7 100%);
      }

      .profile-hero::after {
        content: "";
        position: absolute;
        right: -44px;
        bottom: -54px;
        width: 150px;
        height: 150px;
        border: 20px solid rgba(16, 24, 32, 0.055);
        border-radius: 50%;
      }

      .profile-main {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 14px;
        align-items: center;
      }

      .profile-avatar {
        width: 72px;
        height: 72px;
        border-radius: 8px;
        border: 1px solid #dbe6eb;
        background: #101820;
        color: #fff;
        display: grid;
        place-items: center;
        overflow: hidden;
        font-size: 26px;
        font-weight: 860;
        box-shadow: 0 14px 26px rgba(16, 24, 32, 0.12);
      }

      .profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .profile-name {
        min-width: 0;
        display: grid;
        gap: 6px;
      }

      .profile-name h2 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .profile-trader {
        display: inline-flex;
        width: fit-content;
        max-width: 100%;
        align-items: center;
        gap: 8px;
        border: 1px solid #dce7ec;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.72);
        padding: 7px 10px;
        color: #40515c;
        font-size: 13px;
      }

      .profile-trader strong {
        color: var(--ink);
      }

      .profile-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
      }

      .profile-stats-card {
        overflow: hidden;
        position: relative;
        background:
          radial-gradient(circle at 100% 0%, rgba(38, 122, 150, 0.1), transparent 34%),
          #ffffff;
      }

      .profile-stats-card::after {
        content: "";
        position: absolute;
        right: -52px;
        bottom: -70px;
        width: 150px;
        height: 150px;
        border: 20px solid rgba(16, 24, 32, 0.045);
        border-radius: 50%;
      }

      .profile-stat {
        position: relative;
        z-index: 1;
        min-height: 94px;
        border: 1px solid #e0e8ed;
        border-radius: 8px;
        background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
        padding: 12px;
        display: grid;
        align-content: space-between;
      }

      .profile-stat-head {
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .profile-stat-icon {
        width: 28px;
        height: 28px;
        display: grid;
        place-items: center;
        border-radius: 8px;
        background: #e7f3ed;
        color: var(--green);
      }

      .profile-stat-icon svg {
        width: 17px;
        height: 17px;
      }

      .profile-stat span {
        color: var(--muted);
        font-size: 12px;
      }

      .profile-stat strong {
        font-size: 26px;
        line-height: 1;
      }

      .language-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      .language-button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #f8fbfc;
        color: var(--ink);
        cursor: pointer;
      }

      .language-button.active {
        background: var(--green);
        border-color: var(--green);
        color: #fff;
        font-weight: 760;
      }

      .flag-icon {
        width: 23px !important;
        height: 17px !important;
        border-radius: 3px;
        box-shadow: 0 0 0 1px rgba(16, 24, 32, 0.12);
        object-fit: cover;
        flex: 0 0 auto;
      }

      .bottom-nav {
        position: fixed;
        left: calc(var(--safe-left) + 12px);
        right: calc(var(--safe-right) + 12px);
        bottom: calc(var(--app-safe-bottom) + 10px);
        z-index: 10;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        max-width: 452px;
        margin: 0 auto;
        border: 1px solid rgba(211, 223, 229, 0.95);
        border-radius: 8px;
        background:
          linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 252, 0.94)),
          #f8fbfc;
        padding: 8px;
        backdrop-filter: blur(16px);
        box-shadow: 0 16px 42px rgba(16, 24, 32, 0.12);
      }

      body.desktop .bottom-nav {
        left: 50%;
        right: auto;
        width: min(452px, calc(100vw - 28px));
        transform: translateX(-50%);
      }

      body.desktop .pair-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .nav-button {
        min-height: 52px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #5d6c76;
        display: grid;
        place-items: center;
        gap: 3px;
        cursor: pointer;
        font-size: 12px;
        transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
      }

      .nav-button svg {
        width: 21px;
        height: 21px;
      }

      .nav-button.active {
        background: linear-gradient(135deg, #358f3b, var(--green));
        color: #fff;
        box-shadow: 0 10px 24px rgba(47, 125, 50, 0.22);
      }

      .nav-button:active {
        transform: translateY(1px);
      }

      .state-wrap {
        min-height: 100vh;
        min-height: 100dvh;
        display: grid;
        place-items: center;
        padding:
          calc(18px + var(--safe-top))
          calc(18px + var(--safe-right))
          calc(18px + var(--safe-bottom))
          calc(18px + var(--safe-left));
      }

      .state-card {
        width: min(430px, 100%);
        padding: 24px;
        display: grid;
        gap: 16px;
        text-align: left;
      }

      .state-logo {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .primary-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        border-radius: 8px;
        background: var(--green);
        color: #fff;
        text-decoration: none;
        font-weight: 760;
      }

      .loader {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 3px solid #d6e1e7;
        border-top-color: #101820;
        animation: spin 0.85s linear infinite;
      }

      @keyframes spin {
        to {
          transform: rotate(360deg);
        }
      }

      @keyframes signalStatusPulse {
        0%,
        100% {
          opacity: 0.55;
          transform: scale(0.86);
          box-shadow: 0 0 0 3px rgba(47, 125, 50, 0.12);
        }

        50% {
          opacity: 1;
          transform: scale(1.16);
          box-shadow: 0 0 0 7px rgba(47, 125, 50, 0.18);
        }
      }

      [dir="rtl"] .profile-row {
        direction: rtl;
      }

      @media (max-width: 360px) {
        .brand-title strong {
          font-size: 25px;
        }

        .brand-mark {
          width: 42px;
          height: 50px;
          flex-basis: 42px;
        }

        .brand-mark::before {
          width: 35px;
          height: 31px;
        }

        .brand-mark::after {
          left: 18px;
          width: 22px;
          height: 22px;
        }

        .metric-row,
        .language-grid {
          grid-template-columns: 1fr;
        }

        .pair-list {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .signal-meta.open {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        h1 {
          font-size: 24px;
        }
      }

/* Fly trade premium trading dark theme */
:root {
  --ink: #f6f7ff;
  --muted: #8990b2;
  --line: rgba(126, 104, 255, 0.2);
  --panel: rgba(15, 17, 40, 0.86);
  --soft: rgba(23, 26, 56, 0.88);
  --green: #39d98a;
  --blue: #72b7ff;
  --violet: #8b5cf6;
  --purple: #6d5dfc;
  --danger: #ff4f78;
  color: var(--ink);
  background: #050711;
}

html,
body,
#root {
  background: #050711;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -6%, rgba(93, 107, 255, 0.28), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(39, 210, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #050711 0%, #080914 42%, #050711 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.75), transparent 78%);
}

.premium-glow {
  box-shadow: 0 0 32px rgba(109, 93, 252, 0.34);
}

.app-shell {
  background:
    radial-gradient(circle at 20% 0%, rgba(109, 93, 252, 0.26), transparent 28%),
    radial-gradient(circle at 94% 8%, rgba(114, 183, 255, 0.13), transparent 26%),
    linear-gradient(180deg, rgba(5, 7, 17, 0.96), rgba(7, 8, 20, 0.98));
  color: var(--ink);
}

body.desktop .app-shell {
  border-left-color: rgba(126, 104, 255, 0.18);
  border-right-color: rgba(126, 104, 255, 0.18);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52), 0 0 70px rgba(109, 93, 252, 0.12);
}

.brand-logo-img {
  filter: drop-shadow(0 0 18px rgba(93, 107, 255, 0.34));
}

.profile-chip,
.header-language,
.header-language-menu,
.header-language-option,
.back-button,
.signal-action-button,
.language-button,
.pair-card,
.expiry-button,
.active-preview-card,
.signal-item,
.history-line,
.metric,
.profile-stat,
.profile-trader {
  border-color: rgba(126, 104, 255, 0.2);
  background: rgba(11, 13, 31, 0.74);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 14px 34px rgba(0, 0, 0, 0.22);
}

.header-language-menu {
  background: rgba(9, 10, 26, 0.98);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.48), 0 0 44px rgba(109, 93, 252, 0.14);
}

.header-language-option.active,
.market-badge,
.pair-payout,
.tag,
.history-result.win,
.history-direction.buy,
.signal-loader-status,
.profile-stat-icon {
  background: rgba(57, 217, 138, 0.12);
  color: #69f0ad;
  border-color: rgba(57, 217, 138, 0.24);
}

.hero-panel,
.card,
.state-card {
  border-color: rgba(126, 104, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(22, 24, 55, 0.86), rgba(12, 14, 33, 0.92));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.hero-panel,
.profile-hero,
.profile-stats-card,
.analysis-card,
.signal-loader-card {
  background:
    radial-gradient(circle at 92% 0%, rgba(109, 93, 252, 0.26), transparent 38%),
    radial-gradient(circle at 0% 100%, rgba(0, 214, 255, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(20, 22, 54, 0.9), rgba(10, 12, 30, 0.96));
}

.hero-panel::before,
.signal-card::before {
  background: linear-gradient(180deg, #72b7ff, #8b5cf6 55%, #39d98a);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.65);
}

.hero-panel::after,
.profile-hero::after,
.profile-stats-card::after,
.signal-loader-card::after,
.market-card::after {
  border-color: rgba(139, 92, 246, 0.12);
}

.eyebrow,
.market-kicker,
.pair-payout,
.mini-countdown {
  color: #8fb9ff;
}

p,
.metric span,
.section-heading p,
.history-values,
.profile-row span,
.profile-stat span,
.signal-meta-item span,
.signal-loader-text p,
.analysis-step {
  color: var(--muted);
}

h1,
h2,
h3,
.metric strong,
.profile-stat strong,
.history-values strong,
.profile-trader strong,
.pair-name {
  color: var(--ink);
}

.market-card,
.pair-card,
.expiry-button,
.active-preview-card,
.signal-item,
.history-line,
.profile-stat {
  background:
    linear-gradient(180deg, rgba(21, 23, 53, 0.82), rgba(10, 12, 30, 0.92));
}

.market-card:hover,
.pair-card:hover,
.header-language:hover {
  border-color: rgba(114, 183, 255, 0.52);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), 0 0 26px rgba(109, 93, 252, 0.18);
}

.signal-card {
  border-color: rgba(126, 104, 255, 0.28);
  background:
    radial-gradient(circle at 82% 0%, rgba(139, 92, 246, 0.34), transparent 34%),
    radial-gradient(circle at 12% 92%, rgba(57, 217, 138, 0.13), transparent 32%),
    linear-gradient(145deg, rgba(20, 23, 58, 0.98), rgba(7, 9, 23, 0.98));
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.46), 0 0 42px rgba(109, 93, 252, 0.18);
}

.signal-visual,
.signal-meta-item {
  border-color: rgba(126, 104, 255, 0.2);
  background:
    radial-gradient(circle at 50% 14%, rgba(114, 183, 255, 0.14), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025));
}

.direction-badge.buy,
.history-result-main.win,
.signal-action-button.primary,
.language-button.active,
.primary-link,
.nav-button.active {
  border-color: rgba(114, 183, 255, 0.3);
  background: linear-gradient(135deg, #5fb7ff 0%, #7c4dff 58%, #9b5cff 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(109, 93, 252, 0.32), 0 0 28px rgba(114, 183, 255, 0.16);
}

.direction-badge.sell,
.history-result-main.loss,
.mini-direction.sell {
  background: linear-gradient(135deg, #ff4f78, #9b2cff);
}

.mini-direction.buy,
.history-line.win::before,
.signal-chart path,
.signal-chart polyline {
  background: #39d98a;
  stroke: #39d98a;
}

.result-banner.win {
  background: rgba(57, 217, 138, 0.12);
  color: #69f0ad;
}

.result-banner.loss,
.history-result.loss,
.history-direction.sell {
  background: rgba(255, 79, 120, 0.12);
  color: #ff7b98;
}

.result-banner.draw,
.history-result,
.history-direction {
  background: rgba(137, 144, 178, 0.12);
  color: #c4c8df;
}

.history-line.win,
.history-line.loss,
.history-line.draw {
  background:
    linear-gradient(90deg, rgba(109, 93, 252, 0.14), rgba(12, 14, 33, 0.92) 46%);
}

.profile-avatar,
.signal-icon {
  border-color: rgba(126, 104, 255, 0.26);
  background: linear-gradient(135deg, #11142d, #262055);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34), 0 0 24px rgba(109, 93, 252, 0.2);
}

.bottom-nav {
  border-color: rgba(126, 104, 255, 0.26);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(20, 22, 52, 0.92), rgba(8, 10, 24, 0.94));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.52), 0 0 40px rgba(109, 93, 252, 0.16);
}

.nav-button {
  color: #8d93b8;
  border-radius: 10px;
}

.loader {
  border-color: rgba(126, 104, 255, 0.18);
  border-top-color: #72b7ff;
}

input,
button,
select {
  -webkit-tap-highlight-color: transparent;
}


/* Brand treatment for the dark Telegram miniapp shell. */
.topbar {
  position: sticky;
  top: calc(var(--app-safe-top) + var(--telegram-controls-top-gap));
  z-index: 30;
  justify-content: center;
  min-height: 52px;
  margin: -2px -2px 8px;
  padding: 8px 64px 8px 12px;
  border: 1px solid rgba(126, 104, 255, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(13, 15, 37, 0.82), rgba(8, 10, 25, 0.54));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.brand {
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.brand-rail {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(104, 190, 255, 0.72), transparent);
}

.brand-wordmark {
  color: #74c8ff;
  font-size: 12px;
  font-weight: 860;
  letter-spacing: 0.16em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 16px rgba(104, 190, 255, 0.45);
}

.header-language-wrap {
  position: absolute;
  top: 7px;
  right: 8px;
}

[dir="rtl"] .header-language-wrap {
  right: auto;
  left: 8px;
}

.header-language {
  min-height: 36px;
  padding: 6px 9px;
  background: rgba(11, 13, 31, 0.84);
}

.screen {
  gap: 12px;
}

.hero-panel,
.card {
  scroll-margin-top: 72px;
}

@media (max-width: 360px) {
  .topbar {
    padding-left: 8px;
    padding-right: 58px;
  }

  .brand-rail {
    width: 18px;
  }

  .brand-wordmark {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
}

/* Signal ticket polish: compact, premium, less bulky. */
.signal-card {
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% -10%, rgba(143, 92, 255, 0.28), transparent 36%),
    radial-gradient(circle at 8% 100%, rgba(57, 217, 138, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(18, 20, 52, 0.96), rgba(8, 10, 26, 0.98));
}

.signal-card::after {
  right: -46px;
  top: -58px;
  width: 148px;
  height: 148px;
  border-width: 22px;
}

.signal-top h2 {
  font-size: 25px;
  line-height: 1;
}

.direction-badge {
  min-width: 76px;
  min-height: 42px;
  border-radius: 8px;
  font-size: 16px;
}

.signal-visual {
  min-height: 136px;
  padding: 12px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 12%, rgba(114, 183, 255, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.signal-chart {
  width: min(132px, 58%);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.32));
}

.signal-callout {
  margin-top: -2px;
}

.signal-callout span {
  color: #b9c0dc;
  font-size: 11px;
}

.signal-callout strong {
  font-size: 20px;
}

.signal-meta {
  gap: 8px;
}

.signal-meta.open {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signal-meta-item {
  min-height: 66px;
  padding: 10px 11px;
  border-color: rgba(126, 104, 255, 0.24);
  background:
    radial-gradient(circle at 50% 0%, rgba(114, 183, 255, 0.11), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.signal-meta-item span {
  color: #8f96b9;
  margin-bottom: 7px;
  font-size: 11px;
}

.signal-meta-item strong {
  font-size: 17px;
  line-height: 1.05;
}

.result-banner {
  min-height: 46px;
  border: 1px solid rgba(126, 104, 255, 0.22);
  border-radius: 8px;
  padding: 11px 12px;
}

.result-banner.win,
.result-banner.loss,
.result-banner.draw {
  color: #f8f7ff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    rgba(18, 21, 45, 0.78);
}

.result-banner.win {
  border-color: rgba(57, 217, 138, 0.42);
}

.result-banner.loss {
  border-color: rgba(255, 79, 120, 0.42);
}

.result-banner.draw {
  border-color: rgba(137, 144, 178, 0.34);
  color: #c5cae4;
}

.signal-action-row {
  gap: 10px;
}

.signal-action-button {
  min-height: 46px;
  border-radius: 8px;
}


