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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-size: 1.1em;
}

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

.status-dot.online {
    background-color: #4CAF50;
}

.status-dot.offline {
    background-color: #f44336;
}

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

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.trades-section {
    width: 100%;
    margin-top: 20px;
}

.card-full-width {
    width: 100%;
    max-width: none;
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.4em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.control-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.chart-image {
    text-align: left;
    margin-top: 15px;
    padding: 10px;
    background: rgba(243, 186, 47, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(243, 186, 47, 0.2);
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.binance-chart {
    zoom: 3;
    border-radius: 8px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.binance-chart:hover {
    opacity: 1;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 5px;
}

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

.btn-success {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #f44336, #da190b);
    color: white;
}

.btn-info {
    background: linear-gradient(45deg, #2196F3, #0b7dda);
    color: white;
}

.btn-warning {
    background: linear-gradient(45deg, #ff9800, #e68900);
    color: white;
}

.info-grid, .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item, .stat-item, .balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-item label, .stat-item label, .balance-item label {
    font-weight: 600;
    color: #555;
}

.info-item span, .stat-item span, .balance-item span {
    font-weight: 700;
    color: #333;
}

.permission-status.active {
    color: #4CAF50;
    font-weight: 900;
}

.permission-status.inactive {
    color: #f44336;
    font-weight: 900;
}

.analysis-item {
    margin-bottom: 20px;
}

.analysis-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar.fisher .progress-fill {
    background: linear-gradient(45deg, #2196F3, #0b7dda);
}

.scoring-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.score-item {
    text-align: center;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
}

.score-item h3 {
    margin-bottom: 15px;
    color: #555;
}

.score-display {
    margin-bottom: 10px;
}

.score-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #667eea;
}

.score-max {
    font-size: 1.2em;
    color: #888;
}

.stars {
    font-size: 1.5em;
    color: #ffd700;
}

.recommendation {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
}

.recommendation h3 {
    margin-bottom: 15px;
    color: #555;
}

.recommendation-text {
    font-size: 1.8em;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}

.recommendation-text.BUY {
    background: #4CAF50;
    color: white;
}

.recommendation-text.SELL {
    background: #f44336;
    color: white;
}

.recommendation-text.HOLD {
    background: #ff9800;
    color: white;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#trades-container, #logs-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.trade-item, .log-item {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trade-item.buy {
    border-left-color: #4CAF50;
}

.trade-item.sell {
    border-left-color: #f44336;
}

.log-item.ERROR {
    border-left-color: #f44336;
    background: #ffebee;
}

.log-item.WARNING {
    border-left-color: #ff9800;
    background: #fff3e0;
}

.log-item.TRADE {
    border-left-color: #4CAF50;
    background: #e8f5e8;
}

.no-data {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
}

.trade-time, .log-time {
    font-size: 0.9em;
    color: #666;
    float: right;
}

.trade-details, .log-message {
    margin-top: 5px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        justify-content: center;
    }
    
    .scoring-container {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .card {
        padding: 20px;
    }
}