/* Global Clean Reset */
:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --accent-success: #238636;
    --accent-error: #da3633;
    --accent-warn: #d29922;
    --accent-info: #58a6ff;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-stack);
    margin: 0;
    padding: 20px;
    font-size: 14px;
}

h1, h2, h3 {
    color: #ffffff;
    font-weight: 600;
    margin: 0 0 10px 0;
}

/* Header & Controls */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.controls button {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(240, 246, 252, 0.1);
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

#btn-start { background-color: var(--accent-success); color: white; border-color: var(--accent-success); }
#btn-stop { background-color: #21262d; color: var(--accent-error); border-color: var(--border-color); }
#btn-stop:hover { background-color: rgba(218, 54, 51, 0.1); }

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #21262d;
    border: 1px solid var(--border-color);
}
.status-badge.running { color: #3fb950; border-color: #3fb950; }
.status-badge.stopped { color: #f85149; }

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:last-child td { border-bottom: none; }
tr:hover { background-color: rgba(255,255,255,0.02); }

.score-cell { font-weight: bold; color: #fff; text-align: center; }
.minute-cell { color: var(--accent-info); font-family: monospace; }
.poly-price { color: var(--accent-warn); font-family: monospace; }
.league-name { color: var(--text-secondary); font-size: 12px; }

/* Logs */
#log-container {
    height: 300px;
    overflow-y: auto;
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: #c9d1d9;
}
.log-entry { margin-bottom: 4px; }
.log-level-INFO { color: #8b949e; }
.log-level-SYSTEM { color: #58a6ff; font-weight: bold; }
.log-level-ERROR { color: #f85149; }
.log-level-SUCCESS { color: #3fb950; }
.log-level-ACTION { color: #d29922; }
.log-level-ALERT { color: #a371f7; font-weight: bold; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Responsive */
@media (max-width: 1000px) {
    .grid-container { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    body {
        padding: 12px;
        font-size: 13px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .controls {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .controls button {
        width: 100%;
        padding: 10px 12px;
    }

    .card {
        padding: 10px;
        margin-bottom: 12px;
    }

    #log-container {
        height: 220px;
    }
}

@media (max-width: 430px) {
    .controls {
        grid-template-columns: 1fr;
    }

    .card-header h3 {
        font-size: 15px;
    }
}
