/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    width: 450px;
    height: 1000px;
    overflow: hidden;
    margin: 0 auto;
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 10px;
    overflow-y: auto;
}

/* Верхняя панель статуса */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e293b;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.traffic-light {
    display: flex;
    gap: 5px;
}

.light {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #475569;
}

.light.red {
    background-color: #ef4444;
}

.light.yellow {
    background-color: #f59e0b;
}

.light.green {
    background-color: #10b981;
}

.light.active {
    box-shadow: 0 0 10px currentColor;
}

.time-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.current-time {
    font-size: 18px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #3b82f6;
}

.trade-timer {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #f59e0b;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: #10b981;
    background-color: #064e3b;
    padding: 5px 10px;
    border-radius: 20px;
}

/* Блок текущего статуса */
.current-status {
    background-color: #1e293b;
    border-radius: 8px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border: 1px solid #334155;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    font-size: 12px;
}

.status-item .label {
    color: #94a3b8;
}

.status-item .value {
    font-weight: bold;
    color: #e2e8f0;
}

.status-item .signal {
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: #064e3b;
    color: #10b981;
}

/* Контейнер вопросов */
.questions-container {
    background-color: #1e293b;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #334155;
}

.questions-container h3 {
    color: #3b82f6;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question {
    display: none;
    margin-bottom: 15px;
}

.question.active {
    display: block;
}

.question p {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.answer-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Кнопки */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.yes-btn {
    background-color: #10b981;
    color: white;
    flex: 1;
}

.no-btn {
    background-color: #ef4444;
    color: white;
    flex: 1;
}

.success-btn {
    background-color: #10b981;
    color: white;
}

.danger-btn {
    background-color: #ef4444;
    color: white;
}

.warning-btn {
    background-color: #f59e0b;
    color: white;
}

.info-btn {
    background-color: #3b82f6;
    color: white;
}

.small-btn {
    padding: 5px 10px;
    font-size: 12px;
}

/* Контейнер вердикта */
.verdict-container {
    background-color: #1e293b;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #334155;
}

.verdict-container h3 {
    color: #3b82f6;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.verdict-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.verdict-title {
    font-size: 16px;
    font-weight: bold;
    color: #e2e8f0;
}

.verdict-percentage {
    font-size: 18px;
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 20px;
    background-color: #064e3b;
    color: #10b981;
}

.verdict-description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
    color: #94a3b8;
}

.recommendation-details {
    background-color: #0f172a;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.recommendation-details div {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Активная сделка */
.active-trade {
    background-color: #1e293b;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #334155;
}

.active-trade h3 {
    color: #3b82f6;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.trade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: #0f172a;
    border-radius: 4px;
    font-size: 13px;
}

.profit-chart {
    margin-bottom: 15px;
}

.chart-bar {
    height: 20px;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
    border-radius: 10px;
    margin-bottom: 5px;
    transition: width 1s ease-in-out;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
}

.exit-question {
    margin-top: 15px;
}

.exit-question p {
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
}

.exit-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Журнал сессии */
.session-log {
    background-color: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
    overflow: hidden;
}

.log-header {
    padding: 10px 15px;
    background-color: #0f172a;
    cursor: pointer;
}

.log-header h4 {
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.log-content {
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    font-size: 12px;
    display: block;
}

.log-entry {
    padding: 5px 10px;
    margin-bottom: 5px;
    background-color: #0f172a;
    border-radius: 4px;
    border-left: 3px solid #3b82f6;
    font-size: 11px;
}

.log-entry.success {
    border-left-color: #10b981;
}

.log-entry.warning {
    border-left-color: #f59e0b;
}

.log-entry.danger {
    border-left-color: #ef4444;
}

/* Нижняя навигация */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    background-color: #1e293b;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    margin-top: auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-item:hover {
    color: #e2e8f0;
    background-color: #334155;
}

.nav-item.active {
    color: #3b82f6;
    background-color: #1e40af;
}

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

/* Страница журнала */
.journal-filters {
    background-color: #1e293b;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid #334155;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 120px;
}

.filter-group label {
    font-size: 12px;
    color: #94a3b8;
}

.filter-group select {
    background-color: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 5px;
    font-size: 12px;
}

.statistics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background-color: #1e293b;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #3b82f6;
}

.stat-value.success {
    color: #10b981;
}

.stat-value.danger {
    color: #ef4444;
}

.stat-label {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}

.trades-list {
    background-color: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
    overflow: hidden;
}

.list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px;
    background-color: #0f172a;
    font-size: 12px;
    color: #94a3b8;
    border-bottom: 1px solid #334155;
}

.list-content {
    max-height: 200px;
    overflow-y: auto;
}

.trade-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px;
    font-size: 11px;
    border-bottom: 1px solid #334155;
    transition: background-color 0.2s;
}

.trade-row:hover {
    background-color: #0f172a;
}

.trade-row.success {
    border-left: 3px solid #10b981;
}

.trade-row.danger {
    border-left: 3px solid #ef4444;
}

.no-trades {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
}

.success-chart {
    background-color: #1e293b;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.success-chart h4 {
    color: #94a3b8;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.chart-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chart-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-label {
    width: 30px;
    font-size: 12px;
    color: #e2e8f0;
}

.chart-bar-bg {
    flex: 1;
    height: 20px;
    background-color: #0f172a;
    border-radius: 10px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.chart-count {
    width: 30px;
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
}

/* Страница настроек */
.settings-section {
    background-color: #1e293b;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #334155;
    margin-bottom: 10px;
}

.settings-section h3 {
    color: #3b82f6;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #e2e8f0;
}

.setting-item input[type="number"],
.setting-item input[type="range"],
.setting-item select {
    width: 100%;
    padding: 8px;
    background-color: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 4px;
    font-size: 14px;
}

.input-with-buttons {
    display: flex;
    gap: 10px;
}

.input-with-buttons input {
    flex: 1;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #475569;
    transition: .4s;
    border-radius: 24px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-label {
    background-color: #10b981;
}

input:checked + .toggle-label:before {
    transform: translateX(26px);
}

.hotkey-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #334155;
    font-size: 13px;
}

.key-combination {
    background-color: #0f172a;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #334155;
    font-family: 'Courier New', monospace;
}

.key-description {
    color: #94a3b8;
}

.settings-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

/* Прокрутка */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Адаптация для компактного режима */
.compact-mode .status-bar {
    padding: 5px;
}

.compact-mode .status-item {
    font-size: 11px;
    padding: 3px;
}

.compact-mode .btn {
    padding: 8px 15px;
    font-size: 12px;
}

.compact-mode .question p {
    font-size: 13px;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background-color: #10b981;
}

.notification.warning {
    background-color: #f59e0b;
}

.notification.danger {
    background-color: #ef4444;
}

.notification.info {
    background-color: #3b82f6;
}