/* Стили для страницы графиков */
.content-area {
    padding: 20px;
    height: calc(100vh - 100px);
}

#chart-container {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: 1px solid var(--surface-600, #333);
    border-radius: 8px;
    background: var(--surface-900, #1a1a1a);
    position: relative;
}

/* Стили для скринера */
.screener-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--surface-800, #2a2a2a);
    border-radius: 8px;
    border: 1px solid var(--surface-600, #333);
}

.indicator-selector select {
    padding: 8px 12px;
    background: var(--surface-700, #333);
    border: 1px solid var(--surface-600, #444);
    border-radius: 4px;
    color: var(--text-color, #fff);
    font-size: 14px;
}

.screener-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-800, #2a2a2a);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--surface-600, #333);
}

.screener-table th {
    background: var(--surface-700, #333);
    color: var(--text-color, #fff);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--surface-600, #444);
}

.screener-table td {
    padding: 12px;
    border-bottom: 1px solid var(--surface-600, #333);
    color: var(--text-color-secondary, #ccc);
}

.screener-table tr:hover {
    background: var(--surface-700, #333);
}

.screener-table .positive {
    color: #22c55e;
}

.screener-table .negative {
    color: #ef4444;
}

.screener-table button {
    background: var(--primary-color, #3b82f6);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.screener-table button:hover {
    background: var(--primary-color-dark, #2563eb);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-color-secondary, #ccc);
    font-size: 16px;
}

.lib-trigger-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--surface-700, #2a2a2a);
    border: 1px solid var(--surface-600, #404040);
    border-radius: 8px;
    color: var(--text-color, #f0f0f3);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lib-trigger-btn:hover {
    background: var(--surface-600, #333333);
    border-color: var(--primary-color, #3b82f6);
    transform: translateY(-1px);
}

.lib-trigger-btn:active {
    transform: translateY(0);
    background: var(--surface-800, #1a1a1a);
}

.lib-window {
    position: fixed;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 10000;
    overflow: hidden;
}

.lib-window-visible {
    display: flex;
}

.lib-window-maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
}

.lib-window-minimized .lib-window-content {
    display: none;
}

.lib-window-minimized {
    height: 50px !important;
}

.lib-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-800, #1a1a1a);
    border-bottom: 1px solid var(--surface-600, #333);
    color: var(--text-color, #f0f0f3);
    cursor: move;
    user-select: none;
}

.lib-window-dragging {
    opacity: 0.9;
}

.lib-window-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.lib-window-controls {
    display: flex;
    gap: 8px;
}

.lib-window-control {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lib-window-control:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lib-close:hover {
    background: #ef4444;
}

.lib-window-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #0a0a0a;
}

.lib-window-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.lib-window-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, var(--surface-600, #404040) 50%);
}

.lib-window-maximized .lib-window-resize {
    display: none;
}

.lib-window-resizing {
    opacity: 0.95;
}

@media (max-width: 1200px) {
    .lib-window {
        width: 90vw !important;
        height: 80vh !important;
        left: 5vw !important;
        top: 10vh !important;
    }
}

@media (max-width: 768px) {
    .lib-trigger-btn span {
        display: none;
    }
    
    .lib-trigger-btn {
        padding: 10px;
    }
    
    .lib-window {
        width: 100vw !important;
        height: 100vh !important;
        left: 0 !important;
        top: 0 !important;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .screener-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .screener-table {
        font-size: 14px;
    }
    
    .screener-table th,
    .screener-table td {
        padding: 8px;
    }
}