:root {
    --bg-dark: #090e17;
    --bg-card: #131A2A;
    --bg-box: #1c2438;
    --primary: #2962FF;
    --primary-hover: #1E4ED8;
    --text-main: #FFFFFF;
    --text-muted: #8A96AC;
    --success: #00E676;
    --danger: #FF3D00;
    --border: #232d45;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #030712;
    background-image:
        radial-gradient(ellipse at 15% 20%, rgba(41, 98, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(0, 230, 118, 0.1) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

.mobile-wrapper {
    width: 100%;
    max-width: 400px;
    height: 100vh;
    max-height: 800px;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

@media (min-width: 450px) {
    .mobile-wrapper {
        height: 90vh;
        border-radius: 40px;
        border: 10px solid #101423;
        box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    }
}

/* LOGIN SCREEN */
.login-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: opacity 0.4s;
}

.login-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-container {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.alert-icon {
    width: 60px;
    height: 60px;
    background: rgba(41, 98, 255, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.login-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin: 10px 0 24px;
}

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 8px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 20px;
}

.login-input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    background: var(--bg-box);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-align: left;
    outline: none;
}

.login-input:focus {
    border-color: var(--primary);
}

.login-error {
    color: var(--danger);
    font-size: 13px;
    padding: 10px;
    background: rgba(255, 61, 0, 0.1);
    border-radius: 10px;
    margin-top: 10px;
}

.login-error.hidden {
    display: none;
}

.btn-primary {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(41, 98, 255, 0.3);
    transition: 0.3s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    width: 100%;
    padding: 16px;
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
}

/* MAIN APP */
.main-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.main-app.hidden {
    display: none;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px 15px;
}

.logo img {
    height: 28px;
    object-fit: contain;
}

.lang-selector-wrapper {
    position: relative;
    z-index: 100;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: white;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.2s;
}

.lang-selector:hover {
    border-color: var(--primary);
}

.lang-selector img,
.lang-option img {
    width: 22px;
    height: 16px;
    object-fit: fill;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.lang-options {
    position: absolute;
    top: 110%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    min-width: 120px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.lang-options.hidden {
    display: none;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: 0.2s;
}

.lang-option:hover {
    background: rgba(41, 98, 255, 0.1);
    color: white;
}

.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px 100px;
}

.content-scroll.hidden {
    display: none;
}

.content-scroll::-webkit-scrollbar {
    width: 0;
}

/* TABS */
.tabs-container {
    display: flex;
    position: relative;
    background: var(--bg-box);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.tab-highlight {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: var(--primary);
    border-radius: 8px;
    transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: 0.3s;
}

.tab-btn.active {
    color: white;
}

/* CUSTOM REGULAR / OTC TOGGLE STATE */
.tabs-container.otc-active .tab-highlight {
    left: calc(50%);
}

/* CUSTOM SELECTORS */
.selectors-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    z-index: 10;
}

.custom-select-wrapper {
    position: relative;
    flex: 1;
}

.custom-select {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 0 16px;
    border: 1px solid var(--border);
    height: 52px;
    cursor: pointer;
    color: white;
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s;
}

.custom-select:hover,
.custom-select.active {
    border-color: var(--primary);
}

.custom-select .Chevron {
    color: var(--text-muted);
    font-size: 12px;
    transition: 0.3s;
}

.custom-select.active .Chevron {
    transform: rotate(180deg);
}

.select-content {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    width: calc(100% - 15px);
}

.select-icon {
    font-size: 16px;
    min-width: 25px;
    text-align: center;
}

.custom-option span {
    white-space: nowrap;
}

.select-content span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-options {
    position: absolute;
    top: 58px;
    left: 0;
    min-width: 100%;
    width: max-content;
    overflow-x: hidden;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    z-index: 50;
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
    transform-origin: top center;
    animation: dropDown 0.2s ease-out;
}

@keyframes dropDown {
    from {
        opacity: 0;
        transform: scaleY(0.9);
    }

    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

.custom-select-options.hidden {
    display: none;
}

.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.custom-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: 0.2s;
    border-radius: 8px;
}

.custom-option:hover {
    background: rgba(41, 98, 255, 0.1);
    color: white;
}

.custom-option.selected {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

/* SIGNAL CARD */
.signal-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px 20px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.details-row,
.details-row-split {
    margin-bottom: 12px;
}

.details-row-split {
    display: flex;
    gap: 12px;
}

.detail-box {
    background: var(--bg-box);
    border-radius: 14px;
    padding: 16px;
    flex: 1;
    border: 1px solid transparent;
    transition: 0.3s;
}

.detail-box:hover {
    border-color: rgba(255, 255, 255, 0.05);
}

.detail-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.text-center {
    text-align: center;
}

.pair-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.big-icon {
    font-size: 26px;
}

.big-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.detail-value {
    font-size: 18px;
    font-weight: 800;
    color: white;
}

.direction-container {
    background: var(--bg-box);
    border-radius: 14px;
    padding: 24px 20px;
    border: 1px solid rgba(41, 98, 255, 0.2);
    box-shadow: 0 0 20px rgba(41, 98, 255, 0.05) inset;
    margin-top: 16px;
}

.direction-value {
    text-align: center;
    font-size: 32px;
    font-weight: 900;
    margin: 15px 0 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.direction-value.buy {
    color: var(--success);
    text-shadow: 0 0 15px rgba(0, 230, 118, 0.4);
}

.direction-value.sell {
    color: var(--danger);
    text-shadow: 0 0 15px rgba(255, 61, 0, 0.4);
}

.waiting-text {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    text-shadow: none;
}

/* Progress bar */
.progress-wrap {
    width: 100%;
}

.progress-bg {
    width: 100%;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.15s ease-out;
    box-shadow: 0 0 10px var(--primary);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-get-signal {
    width: 100%;
    padding: 20px;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(41, 98, 255, 0.4);
    transition: 0.3s;
}

.btn-get-signal:disabled {
    background: var(--bg-box);
    box-shadow: none;
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-get-signal:active:not(:disabled) {
    transform: scale(0.97);
}

.timer-wrap.hidden {
    display: none;
}

.timer-fill {
    transition: width 1s linear;
}

/* Profile Section */
.profile-section {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    height: 100%;
}

.profile-section.hidden {
    display: none;
}

.profile-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px 20px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.profile-avatar {
    width: 100%;
    height: auto;
    max-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 25px;
}

.profile-avatar img {
    height: 100%;
    max-height: 50px;
    object-fit: contain;
}

.profile-info h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: white;
}

.status-badge {
    font-size: 13px;
    color: var(--success);
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 25px;
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

.profile-details {
    background: var(--bg-box);
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: left;
    border: 1px solid var(--border);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-row strong {
    color: white;
}

.btn-logout {
    width: 100%;
    padding: 16px;
    background: rgba(255, 61, 0, 0.1);
    color: var(--danger);
    font-size: 15px;
    font-weight: 700;
    border: 1px solid rgba(255, 61, 0, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-logout:hover {
    background: rgba(255, 61, 0, 0.2);
}

/* Bottom Nav */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 10;
}

@media (min-width: 415px) {
    .bottom-nav {
        border-radius: 0 0 28px 28px;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    transition: 0.3s;
}

.nav-item i {
    font-size: 22px;
}

.nav-item.active {
    color: var(--primary);
}