/* Основные стили для GUI */

/* Welcome section */
.welcome-section {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.welcome-section h1 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #000080;
}

/* Quick links */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 16px;
}

.quick-link {
    display: block;
    padding: 16px;
    background: #C0C0C0;
    border: 2px outset #C0C0C0;
    text-decoration: none;
    color: #000000;
    text-align: center;
    transition: all 0.1s;
}

.quick-link:hover {
    background: #D4D0C8;
    border: 2px inset #C0C0C0;
}

.link-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.link-title {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 4px;
}

.link-desc {
    font-size: 10px;
    color: #404040;
}

/* Status section */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 12px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #FFFFFF;
    border: 1px inset #C0C0C0;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #FFFFFF;
}

.status-label {
    font-weight: bold;
}

.status-value {
    color: #008000;
}

/* Thoughts Window - полноэкранное окно */
.thoughts-window {
    position: fixed;
    top: 2%;
    left: 2%;
    right: 2%;
    bottom: 10%;
    width: auto;
    height: auto;
    max-width: none;
    margin: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.thoughts-window .window-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 8px;
}

.thoughts-window .tabs {
    flex-shrink: 0;
    margin-bottom: 8px;
}

.thoughts-window .tab-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.thoughts-window .tab-pane {
    display: none;
    flex: 1;
    overflow: hidden;
    flex-direction: column;
    min-height: 0;
}

.thoughts-window .tab-pane.active {
    display: flex;
}

/* Thoughts */
.thoughts-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
}

.thought-card {
    background: #FFFFFF;
    border: 1px inset #C0C0C0;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #FFFFFF;
}

.thought-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
    color: #404040;
}

.thought-time {
    font-weight: bold;
    font-size: 12px;
}

.thought-confidence {
    color: #000080;
    font-size: 12px;
}

.thought-content {
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 4px 0;
}

.thought-chart-link {
    margin-top: 12px;
    text-align: center;
}

.chart-link-button {
    display: inline-block;
    padding: 6px 16px;
    background: #C0C0C0;
    border: 2px outset #C0C0C0;
    color: #000000;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    font-family: 'MS Sans Serif', sans-serif;
}

.chart-link-button:hover {
    background: #D4D0C8;
}

.chart-link-button:active {
    border: 2px inset #C0C0C0;
    background: #A0A0A0;
}

/* Модальное окно для графика */
.chart-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.chart-modal-content {
    position: relative;
    margin: 2% auto;
    width: 95%;
    height: 90%;
    max-width: 95%;
    max-height: 90%;
}

.chart-modal-content .window {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-modal-body {
    flex: 1;
    overflow: auto;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #C0C0C0;
}

.chart-full-image {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    border: 2px inset #C0C0C0;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #FFFFFF;
    background: #FFFFFF;
    padding: 4px;
    object-fit: contain;
}

/* Trades */
.trades-container {
    max-height: 600px;
    overflow-y: auto;
    padding: 8px;
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    font-size: 10px;
}

.trades-table th {
    background: #000080;
    color: #FFFFFF;
    padding: 4px 8px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #000000;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
}

.trades-table td {
    padding: 4px 8px;
    border: 1px solid #C0C0C0;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
}

.trade-row.buy {
    background: #E8F5E9;
}

.trade-row.sell {
    background: #FFEBEE;
}

.trade-row:hover {
    background: #D4D0C8;
}

.profit {
    color: #008000;
    font-weight: bold;
}

.loss {
    color: #800000;
    font-weight: bold;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 12px;
}

.stat-card {
    background: #FFFFFF;
    border: 2px outset #C0C0C0;
    padding: 16px;
    text-align: center;
    box-shadow: 2px 2px 0 #000000;
}

.stat-label {
    font-size: 10px;
    color: #404040;
    margin-bottom: 8px;
    font-weight: bold;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
}

.stat-value.profit {
    color: #008000;
}

.stat-value.loss {
    color: #800000;
}

.stats-timestamp {
    text-align: center;
    padding: 8px;
    font-size: 10px;
    color: #404040;
    border-top: 1px solid #808080;
    margin-top: 12px;
}

/* Utility classes */
.loading {
    text-align: center;
    padding: 40px;
    color: #404040;
    font-style: italic;
}

.empty {
    text-align: center;
    padding: 40px;
    color: #808080;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 40px;
    color: #800000;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .link-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trades-table {
        font-size: 9px;
    }
    
    .trades-table th,
    .trades-table td {
        padding: 2px 4px;
    }
}

