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

html {
    background: #0a0e1a;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 50%, #0d1321 100%);
    min-height: 100vh;
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.bg-decoration {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.bg-decoration-1 {
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, #00d9ff 0%, transparent 70%);
}

.bg-decoration-2 {
    bottom: -200px;
    left: -200px;
    background: radial-gradient(circle, #00ff88 0%, transparent 70%);
}

.container {
    width: 100%;
    max-width: 1200px;
    min-width: 320px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 50%, #0d1321 100%);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 24px;
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auto-refresh-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.auto-refresh-select {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.auto-refresh-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 217, 255, 0.5);
}

.auto-refresh-select:focus {
    border-color: #00d9ff;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.2);
}

.auto-refresh-select option {
    background: #1a1f3a;
    color: #fff;
}

.refresh-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00d9ff;
    display: none;
    animation: refreshPulse 1s infinite;
}

.refresh-indicator.active {
    display: block;
}

@keyframes refreshPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d9ff, #00ff88);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #0a0e1a;
}

.user-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

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

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.auth-page {
    display: none;
    min-height: calc(100vh - 100px);
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.8) 0%, rgba(26, 31, 58, 0.8) 50%, rgba(13, 19, 33, 0.8) 100%);
}

.auth-page.active {
    display: flex;
}

.auth-card {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.95) 0%, rgba(26, 31, 58, 0.95) 50%, rgba(13, 19, 33, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 50px 60px;
    max-width: 600px;
    width: 100%;
    backdrop-filter: blur(20px);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 20px;
    font-size: 12px;
    color: #00d9ff;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.auth-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 40px;
}

.auth-form {
    margin-bottom: 30px;
}

.auth-form .form-group {
    margin-bottom: 24px;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.auth-form .form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: #00d9ff;
    background: rgba(0, 217, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.1);
}

.auth-form .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #00d9ff 0%, #00b4d8 100%);
    color: #fff;
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.4);
}

.btn-primary-large {
    padding: 18px 48px;
    font-size: 18px;
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(5px);
}

.auth-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.auth-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #00d9ff;
}

.auth-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.auth-footer-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

.switch-auth {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.switch-auth a {
    color: #00d9ff;
    text-decoration: none;
    font-weight: 500;
}

.switch-auth a:hover {
    text-decoration: underline;
}

.content-area {
    display: none;
    position: relative;
    min-height: calc(100vh - 100px);
    padding-bottom: 40px;
    padding-top: 10px;
}

.content-area.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#klineBackground {
    position: fixed;
    top: 100px;
    left: 0;
    width: 100%;
    height: calc(100vh - 140px);
    z-index: 0;
    pointer-events: none;
    background: transparent;
    mask-image: linear-gradient(to bottom, transparent 0px, black 100px);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0px, black 100px);
}

.content-overlay {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 70%;
    max-width: 700px;
    margin: 0 auto;
    box-sizing: border-box;
}

.current-product {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.timestamp-info {
    font-size: 12px;
    color: rgba(0, 217, 255, 0.6);
    font-family: 'Courier New', monospace;
}

.overall-timestamp {
    text-align: left;
    margin-top: 4px;
    width: 100%;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.product-selector {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

#dashboardContainer {
    width: 100%;
}

#klinesContainer {
}

.product-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    flex-shrink: 1;
    white-space: nowrap;
}

.product-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.product-tag.active {
    background: linear-gradient(135deg, #00d9ff, #00b4d8);
    color: #fff;
    border-color: transparent;
}

.product-tag.locked {
    background: rgba(100, 100, 100, 0.2);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
}

.tutorial-link {
    display: block;
    padding: 12px 20px;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
    text-align: left;
    backdrop-filter: blur(5px);
}

.tutorial-link .tutorial-title {
    font-size: 15px;
    margin-bottom: 4px;
}

.tutorial-link .tutorial-desc {
    font-size: 12px;
    font-weight: normal;
    opacity: 0.85;
}

.tutorial-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.25);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    display: flex;
}

.tutorial-card {
    background: linear-gradient(180deg, #1a1f3a 0%, #0a0e1a 100%);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.25), rgba(238, 90, 90, 0.15));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tutorial-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.tutorial-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 6px 12px;
    line-height: 1;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tutorial-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.tutorial-content {
    padding: 24px;
}

.tutorial-section {
    margin-bottom: 24px;
}

.tutorial-section:last-child {
    margin-bottom: 0;
}

.tutorial-section h4 {
    color: #00d9ff;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-section p {
    color: rgba(255, 255, 255, 0.85);
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.7;
    padding-left: 24px;
    position: relative;
}

.tutorial-section p::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00ff88;
    font-weight: bold;
}

.tutorial-note {
    background: rgba(255, 107, 107, 0.1);
    border-left: 3px solid #ff6b6b;
    padding: 12px 16px;
    margin-top: 16px;
    border-radius: 0 8px 8px 0;
}

.tutorial-note p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    margin: 0;
    padding: 0;
}

.tutorial-note p::before {
    content: '⚠️';
    margin-right: 8px;
    font-size: 14px;
}

.strategy-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(10, 14, 26, 0.5);
    border-radius: 8px;
    width: 300px;
    border: 1px solid rgba(0, 217, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.strategy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: transparent;
    border-bottom: none;
}

.strategy-title {
    font-weight: 600;
    color: #00d9ff;
    font-size: 12px;
}

.strategy-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 12px;
    line-height: 1.4;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.strategy-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.strategy-popup.collapsed .strategy-content {
    display: none;
}

.strategy-content {
    padding: 8px 12px;
}

.strategy-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 4px;
    white-space: nowrap;
}

.strategy-text:last-child {
    margin-bottom: 0;
}

.strategy-risk {
    color: #ffd700;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 4px;
    white-space: nowrap;
}

.strategy-mandatory {
    color: #ff6b6b;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 3px;
    white-space: nowrap;
}

.strategy-mandatory a {
    color: #00d9ff;
    text-decoration: underline;
}

.strategy-mandatory a:hover {
    color: #00ff88;
}

.product-tag.locked:hover {
    background: rgba(100, 100, 100, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.indicators-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.indicator-card {
    background: rgba(26, 31, 58, 0.3);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    backdrop-filter: blur(3px);
}

.indicator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.indicator-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.indicator-change {
    font-size: 13px;
    color: #ff4444;
    font-family: 'Courier New', monospace;
}

.probability-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.prob-block {
    flex: 1;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prob-block.bullish {
    background: rgba(0, 255, 136, 0.25);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.prob-block.bearish {
    background: rgba(255, 68, 68, 0.25);
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.prob-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.prob-value {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.prob-block.bullish .prob-value {
    color: #00ff88;
}

.prob-block.bearish .prob-value {
    color: #ff4444;
}

.signal-desc {
    font-size: 12px;
    color: #00d9ff;
    margin-bottom: 6px;
}

.detail-info {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
    line-height: 1.4;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.card-change {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.positive {
    color: #00ff88;
}

.negative {
    color: #ff4757;
}

.card-change.up {
    color: #00ff88;
}

.card-change.down {
    color: #ff4444;
}

.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.toggle-btn {
    background: rgba(0, 217, 255, 0.2);
    border: 1px solid rgba(0, 217, 255, 0.4);
    border-radius: 8px;
    padding: 6px 12px;
    color: #00d9ff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-btn:hover {
    background: rgba(0, 217, 255, 0.3);
    border-color: rgba(0, 217, 255, 0.6);
}

.indicators-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    max-height: 2000px;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    overflow: hidden;
    opacity: 1;
    margin-top: 16px;
}

.indicators-container.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    gap: 0;
}

.overall-card {
    grid-column: 1 / -1;
    background: rgba(26, 31, 58, 0.2);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.overall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.overall-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.signal-name {
    color: #00d9ff;
    font-weight: 700;
}

.overall-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.overall-indicator.bullish {
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
}

.overall-indicator.bearish {
    background: #ff4444;
    box-shadow: 0 0 10px #ff4444;
}

.overall-indicator.neutral {
    background: #aaa;
    box-shadow: 0 0 10px #aaa;
}

.overall-probability-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.overall-prob-card {
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.3s ease;
}

.overall-prob-card.bullish {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 255, 136, 0.05));
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.overall-prob-card.bearish {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.15), rgba(255, 68, 68, 0.05));
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.prob-card-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.prob-card-value {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.overall-prob-card.bullish .prob-card-value {
    color: #00ff88;
}

.overall-prob-card.bearish .prob-card-value {
    color: #ff4444;
}

.overall-progress-bar {
    position: relative;
    width: 100%;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 7px;
}

.progress-bullish {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    border-radius: 7px;
    transition: width 0.5s ease;
}

.signal-strength {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.signal-strength-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.signal-strength-value {
    font-size: 13px;
    font-weight: 700;
    color: #00d9ff;
}

.probability-bar {
    display: flex;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bullish-bar {
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    transition: width 0.3s ease;
}

.bearish-bar {
    background: linear-gradient(90deg, #ff4444, #cc3333);
    transition: width 0.3s ease;
}

.probability-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.prob-label {
    display: flex;
    align-items: center;
    gap: 4px;
}

.prob-label.bullish {
    color: #00ff88;
}

.prob-label.bearish {
    color: #ff4444;
}

.bollinger-card {
    grid-column: span 1;
}

.bollinger-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

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

.bollinger-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}

.bollinger-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.ema-values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

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

.ema-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}

.ema-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.adx-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.adx-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.adx-value {
    font-size: 16px;
    font-weight: 700;
    color: #00d4ff;
}

.adx-main-value {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.adx-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    gap: 12px;
}

.adx-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.signal-strength {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.signal-strength-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.signal-strength-value {
    font-size: 13px;
    font-weight: 700;
    color: #00d9ff;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.message.show {
    transform: translateX(0);
}

.message.success {
    background: rgba(0, 255, 136, 0.9);
}

.message.error {
    background: rgba(255, 71, 87, 0.9);
}

.debug-info {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.debug-info .label {
    color: #00d9ff;
    font-weight: bold;
    margin-bottom: 8px;
}

.debug-info .product-data {
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.debug-info .product-name {
    color: #00ff88;
    font-weight: bold;
    margin-bottom: 4px;
}

.debug-info .kline-data {
    color: #ffd700;
}

.debug-info .indicator-data {
    color: #00b4d8;
}

.kline-wrapper {
    width: 100%;
}

.kline-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 152, 0, 0.03));
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 16px;
    padding: 20px;
}

.kline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.kline-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
}

.kline-product-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.kline-values {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 12px;
}

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

.kline-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.kline-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.kline-time {
    text-align: center;
    font-size: 12px;
    color: rgba(0, 217, 255, 0.6);
    font-family: 'Courier New', monospace;
}

.kline-chart-card {
    background: linear-gradient(135deg, rgba(38, 166, 154, 0.08), rgba(38, 166, 154, 0.03));
    border: 1px solid rgba(38, 166, 154, 0.25);
    border-radius: 16px;
    padding: 20px;
}

#klineChart {
    display: block;
    width: 100%;
    height: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#klineChartContainer {
    transition: all 0.3s ease;
    overflow: hidden;
}

#klineChartContainer.collapsed {
    display: none;
}

.trade-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.trade-section {
    background: rgba(26, 31, 58, 0.2);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.trade-section h3 {
    margin: 0 0 15px 0;
    color: #00d9ff;
}

.trade-buttons {
    display: flex;
    gap: 15px;
}

.trade-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.buy-btn {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
}

.sell-btn {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
}

.trade-btn:hover {
    transform: scale(1.05);
}

.trade-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.trade-form .form-group {
    display: flex;
    flex-direction: column;
}

.trade-form .form-group label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
}

.trade-form .form-group input,
.trade-form .form-group select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 6px;
    padding: 10px;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.send-btn {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #0088ff, #0066cc);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 136, 255, 0.4);
}

.history-section {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(0, 136, 255, 0.05));
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.history-section h3 {
    margin: 0 0 15px 0;
    color: #00d9ff;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.history-table th {
    color: #00d9ff;
    font-weight: 600;
}

.text-green {
    color: #00ff88 !important;
}

.text-red {
    color: #ff4444 !important;
}

.text-yellow {
    color: #ffcc00 !important;
}

.nav-bar {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(0, 136, 255, 0.08));
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 20px;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-link {
    padding: 10px 20px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(0, 217, 255, 0.1);
    color: #fff;
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.3), rgba(0, 136, 255, 0.2));
    color: #00d9ff;
    border: 1px solid rgba(0, 217, 255, 0.4);
}

.trade-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.trade-summary-card {
    background: rgba(26, 31, 58, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.trade-summary-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.summary-content {
    display: flex;
    gap: 0;
}

.summary-left {
    flex: 1;
    padding: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-right {
    flex: 1;
    padding: 20px;
}

.summary-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.summary-title {
    font-size: 18px;
    font-weight: 700;
    color: #00ff88;
}

.summary-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.position-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 255, 136, 0.15);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.summary-buttons {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.summary-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 100px;
}

.summary-btn.buy-btn {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
    border: 1px solid rgba(0, 255, 136, 0.5);
}

.summary-btn.sell-btn {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
    border: 1px solid rgba(255, 68, 68, 0.5);
}

.summary-btn.close-btn {
    background: linear-gradient(135deg, #ffaa00, #ff8800);
    color: #000;
    border: 1px solid rgba(255, 170, 0, 0.5);
}

.summary-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.trade-panel {
    display: block;
    gap: 20px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.trade-panel.collapsed {
    display: none;
}

.summary-section {
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-section:last-of-type {
    border-bottom: none;
}

.summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.summary-value.bid-value {
    font-size: 18px;
    color: #ff4444;
}

.summary-value.ask-value {
    font-size: 18px;
    color: #00ff88;
}

.position-header {
    margin-bottom: 8px;
}

.position-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.position-pnl {
    font-size: 14px;
    font-weight: 600;
    color: #00ff88;
    font-family: 'Courier New', monospace;
}

.position-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.position-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.position-types {
    display: flex;
    gap: 20px;
}

.position-type {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.type-dot.long-dot {
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
}

.type-dot.short-dot {
    background: #ff4444;
    box-shadow: 0 0 8px #ff4444;
}

.type-value {
    margin-left: 4px;
    color: #fff;
    font-weight: 600;
}

.position-empty {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.05), rgba(0, 136, 255, 0.03));
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.empty-icon {
    font-size: 20px;
    opacity: 0.6;
}

.empty-text {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.empty-subtext {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

.empty-status .status-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.empty-status .divider {
    color: rgba(255, 255, 255, 0.3);
}

.position-list {
    display: none;
    margin-bottom: 12px;
    gap: 10px;
    flex-direction: column;
}

.position-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 12px;
    border-left: 3px solid #00ff88;
}

.position-item.short {
    border-left-color: #ff4444;
}

.position-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.position-id {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
}

.position-type-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.position-type-badge.long {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.position-type-badge.short {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
}

.position-item-body {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.position-info-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.position-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.position-value-text {
    font-size: 12px;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.position-value-text.pnl-positive {
    color: #00ff88;
}

.position-value-text.pnl-negative {
    color: #ff4444;
}

.pnl-positive {
    color: #00ff88;
}

.pnl-negative {
    color: #ff4444;
}

.auto-trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.auto-trade-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.auto-trade-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.auto-trade-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.setting-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 10px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
}

.setting-input:focus {
    border-color: rgba(0, 217, 255, 0.5);
    background: rgba(0, 217, 255, 0.05);
}

.auto-trade-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.trade-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.trade-btn.auto-buy {
    background: linear-gradient(135deg, #00b894, #00a580);
    color: #fff;
}

.trade-btn.auto-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 184, 148, 0.4);
}

.trade-btn.auto-sell {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: #fff;
}

.trade-btn.auto-sell:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.4);
}

.trade-btn.close-all {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.trade-btn.close-all:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-icon {
    font-size: 11px;
}

.trade-toggle-btn {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 217, 255, 0.1);
    color: rgba(0, 217, 255, 0.9);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.trade-toggle-btn:hover {
    background: rgba(0, 217, 255, 0.15);
    border-color: rgba(0, 217, 255, 0.3);
    color: #00d9ff;
}

.account-summary-card,
.positions-card,
.auto-trade-card,
.profits-card,
.trade-history-card {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.9) 0%, rgba(26, 31, 58, 0.9) 100%);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.account-summary-card:hover,
.positions-card:hover,
.auto-trade-card:hover,
.profits-card:hover,
.trade-history-card:hover {
    border-color: rgba(0, 217, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.1);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.account-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.account-id {
    font-size: 14px;
    font-weight: 600;
    color: #00d9ff;
    font-family: 'Courier New', monospace;
}

.account-product {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.connection-status .status-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.account-balance-row,
.account-quotes-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.account-balance-row {
    margin-bottom: 12px;
}

.balance-item,
.quote-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex-shrink: 0;
}

.balance-label,
.quote-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
    width: 140px;
    min-width: 140px;
    flex-shrink: 0;
}

.quote-value {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    width: 120px;
    min-width: 120px;
    flex-shrink: 0;
}

.balance-item:first-child .balance-value {
    color: #ffd700;
}

.balance-item:last-child .balance-value {
    color: #00ff88;
}

.quote-item:first-child .quote-value {
    color: #ff4444;
}

.quote-item:last-child .quote-value {
    color: #00ff88;
}

.positions-header,
.profits-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.positions-title,
.profits-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.refresh-btn {
    background: transparent;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0;
}

.refresh-btn:hover {
    transform: rotate(180deg);
}

.refresh-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.refresh-icon {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.refresh-btn:hover .refresh-icon {
    color: rgba(255, 255, 255, 0.9);
}

.floating-pnl-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.floating-pnl-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.floating-pnl-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
    font-family: 'Courier New', monospace;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 4px 10px;
    border-radius: 4px;
}

.position-counts {
    display: flex;
    gap: 16px;
}

.count-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.count-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.count-dot.long-dot {
    background: #00ff88;
    box-shadow: 0 0 6px #00ff88;
}

.count-dot.short-dot {
    background: #ff4444;
    box-shadow: 0 0 6px #ff4444;
}

.count-value {
    font-weight: 600;
    color: #fff;
    margin-left: 2px;
}

.positions-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.positions-top-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pnl-ring-wrapper {
    flex-shrink: 0;
}

.pnl-ring-container {
    position: relative;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pnl-ring {
    width: 96px;
    height: 96px;
}

.ring-bg {
    fill: none;
    stroke: #ff4444;
    stroke-width: 3;
    stroke-dasharray: 6 4;
    opacity: 0.9;
}

.pnl-center-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #ff4444;
    white-space: nowrap;
}

.pnl-center-value.positive {
    color: #00ff88;
}

.pnl-center-value.negative {
    color: #ff4444;
}

.position-type-counts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.type-count-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.type-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.type-dot.long-dot {
    background: #00d9ff;
    box-shadow: 0 0 6px #00d9ff;
}

.type-dot.short-dot {
    background: #ff4444;
    box-shadow: 0 0 6px #ff4444;
}

.type-label {
    color: rgba(255, 255, 255, 0.7);
}

.type-count {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.positions-list-wrapper {
    width: 100%;
    min-width: 0;
}

.positions-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 180px;
    overflow-y: auto;
    min-width: 0;
    padding-right: 4px;
}

.positions-list::-webkit-scrollbar {
    width: 8px;
}

.positions-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.positions-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.positions-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.position-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 100px;
    box-sizing: border-box;
}

.empty-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.empty-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.empty-status .status-dot {
    width: 6px;
    height: 6px;
    background: #00d9ff;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.empty-status .divider {
    color: rgba(255, 255, 255, 0.3);
}

.position-header {
    display: grid;
    grid-template-columns: 120px 60px 70px 100px 100px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 4px;
}

.position-header-item {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-item {
    display: grid;
    grid-template-columns: 120px 60px 70px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.position-item:last-child {
    border-bottom: none;
}

.position-symbol {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.position-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-align: center;
    text-transform: lowercase;
}

.position-badge.long {
    background: #10b981;
    color: #fff;
}

.position-badge.short {
    background: #ef4444;
    color: #fff;
}

.position-lot {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Courier New', monospace;
    text-align: left;
}

.position-sl {
    font-size: 13px;
    color: rgba(255, 68, 68, 0.9);
    font-family: 'Courier New', monospace;
}

.position-tp {
    font-size: 13px;
    color: rgba(16, 185, 129, 0.9);
    font-family: 'Courier New', monospace;
}

.position-pnl {
    font-size: 14px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-align: left;
    min-width: 80px;
}

.position-pnl.positive {
    color: #00ff88;
}

.position-pnl.negative {
    color: #ff4444;
}

.profits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profit-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.profit-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.profit-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
    min-width: 100px;
}

.profit-value.positive {
    color: #00ff88;
}

.profit-value.negative {
    color: #ff4444;
}

.trade-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    cursor: pointer;
    padding: 8px 0;
    transition: all 0.3s;
}

.trade-history-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.trade-history-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.toggle-icon {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s;
}

.trade-history-card.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.trade-history-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.trade-history-card.collapsed .trade-history-content {
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.trade-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trade-history-item {
    display: grid;
    grid-template-columns: 1fr 100px 80px 100px;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.trade-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trade-symbol {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.trade-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.trade-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    text-align: center;
    text-transform: lowercase;
}

.trade-type-badge.buy {
    background: #10b981;
    color: #fff;
}

.trade-type-badge.sell {
    background: #ef4444;
    color: #fff;
}

.trade-volume {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
}

.trade-profit {
    font-size: 14px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-align: right;
    color: rgba(255, 255, 255, 0.7);
}

.trade-profit.positive {
    color: #00ff88;
}

.trade-profit.negative {
    color: #ff4444;
}

.load-more-btn {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.no-records {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.auto-trade-card {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.4), rgba(138, 43, 226, 0.1));
}

@media (max-width: 768px) {
    .content-overlay {
        width: 95%;
        max-width: 95%;
        padding: 0 10px;
    }

    .summary-content {
        flex-direction: column;
    }

    .summary-left {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 16px;
    }

    .summary-right {
        padding-top: 16px;
    }

    .summary-row {
        grid-template-columns: 1fr 1fr;
    }

    .auto-trade-settings {
        grid-template-columns: 1fr 1fr;
    }

    .auto-trade-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .nav-link {
        flex: 1;
        text-align: center;
        min-width: calc(50% - 5px);
    }

    .product-selector {
        justify-content: center;
    }

    .card {
        padding: 16px;
    }

    .indicators-grid {
        grid-template-columns: 1fr;
    }

    .overall-card {
        gap: 16px;
        padding: 16px;
    }

    .overall-title {
        font-size: 15px;
    }

    .prob-card-value {
        font-size: 22px;
    }

    .overall-prob-card {
        padding: 12px 14px;
    }

    .overall-bars {
        flex-direction: column;
        gap: 8px;
    }

    .overall-bar-container {
        flex-direction: column;
        align-items: center;
    }

    .kline-values {
        grid-template-columns: repeat(2, 1fr);
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .trade-history-item {
        grid-template-columns: 1fr 60px 60px 70px;
        gap: 8px;
        padding: 10px 12px;
    }

    .trade-type-badge {
        padding: 2px 6px;
        font-size: 10px;
        min-width: auto;
    }

    .trade-volume {
        font-size: 12px;
    }

    .trade-profit {
        font-size: 12px;
    }

    .container {
        padding: 10px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .auth-title {
        font-size: 32px;
    }

    .account-summary-card,
    .positions-card,
    .auto-trade-card,
    .profits-card,
    .trade-history-card {
        padding: 16px;
    }

    .account-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .position-counts {
        flex-wrap: wrap;
    }

    .profits-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .profit-value {
        font-size: 18px;
    }

    .position-header {
        grid-template-columns: 120px 60px 70px 1fr;
    }

    .position-item {
        grid-template-columns: 120px 60px 70px 1fr;
    }
}
