:root {
    --primary-color: #0f0;
    --primary-color-dark: #0a0;
    --primary-background: #0f0;
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #0a0a0a;
    color: var(--primary-color);
    overflow-x: hidden;
    line-height: 1.4;
}

/* MAIN CONTAINER */
#game-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 10px;
    gap: 10px;
}

/* HEADER */
#header {
    background: #000;
    border: 2px solid var(--primary-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

#title h1 {
    font-size: 24px;
    letter-spacing: 3px;
    margin-bottom: 3px;
}

#title .subtitle {
    font-size: 11px;
    color: var(--primary-color-dark);
    letter-spacing: 2px;
}

#stats-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-label {
    font-size: 10px;
    color: var(--primary-color-dark);
    letter-spacing: 1px;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

/* CAPTCHA GRID */
#captcha-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex: 1;
}

.captcha-window {
    background: #000;
    border: 2px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #0a0a0a;
    border-bottom: 1px solid var(--primary-color);
}

.window-title {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

/* UPGRADES SECTION */
#upgrades-section {
    background: #000;
    border: 2px solid var(--primary-color);
    padding: 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--primary-color);
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 16px;
    letter-spacing: 2px;
}

.bot-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bot-selector label {
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--primary-color-dark);
}

.bot-selector select {
    background: #000;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    cursor: pointer;
    letter-spacing: 1px;
}

.bot-selector select:focus {
    outline: none;
    box-shadow: 0 0 10px var(--primary-color);
}

/* BOT MANAGEMENT LAYOUT */
#bot-management {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

/* BOT INFO PANEL */
.bot-info-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-section {
    background: #0a0a0a;
    border: 1px solid var(--primary-color);
    padding: 15px;
}

.info-section h3 {
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.bot-stats-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-row-large {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #000;
    border: 1px solid var(--primary-color);
}

.stat-row-large .label {
    color: var(--primary-color-dark);
    letter-spacing: 1px;
    font-size: 12px;
}

.stat-row-large .value {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 14px;
}

.status-badge {
    padding: 3px 10px;
    background: #000;
    border: 1px solid var(--primary-color);
    font-size: 11px;
}

.status-badge.online {
    background: var(--primary-background);
    color: #000;
}

.status-badge.offline {
    color: var(--primary-color-dark);
}

/* UPGRADES PANEL */
.upgrades-panel {
    background: #0a0a0a;
    border: 1px solid var(--primary-color);
    padding: 15px;
}

.upgrades-panel > h3 {
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--primary-color);
    text-align: center;
}

.upgrade-item {
    background: #000;
    border: 1px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 15px;
}

.upgrade-item:last-child {
    margin-bottom: 0;
}

.upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.upgrade-name {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.upgrade-level {
    font-size: 11px;
    color: var(--primary-color-dark);
    letter-spacing: 1px;
}

.upgrade-description {
    font-size: 11px;
    color: var(--primary-color-dark);
    margin-bottom: 10px;
    font-style: italic;
}

.upgrade-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px;
    background: #0a0a0a;
    border: 1px solid var(--primary-color);
    font-size: 11px;
    gap: 10px;
}

.current-stat {
    color: var(--primary-color-dark);
}

.arrow {
    color: var(--primary-color);
    font-size: 14px;
}

.next-stat {
    color: var(--primary-color);
    font-weight: bold;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    #bot-management {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #captcha-grid {
        grid-template-columns: 1fr;
    }

    #bot-management {
        grid-template-columns: 1fr;
    }

    #header {
        flex-direction: column;
        align-items: flex-start;
    }

    #stats-bar {
        width: 100%;
        justify-content: space-between;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-background);
    border: 1px solid #000;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-background);
}

/* RAINBOW THEME FOR MAX DIFFICULTY BIAS */
:root.rainbow-theme {
    --primary-color: #f0f;
    --primary-color-dark: #a0a;
    --primary-background: #f0f;
    --rainbow-gradient: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f);
}

.rainbow-theme #header,
.rainbow-theme .captcha-window,
.rainbow-theme #upgrades-section,
.rainbow-theme .bot-select,
.rainbow-theme .info-section,
.rainbow-theme .stat-row-large,
.rainbow-theme .status-badge,
.rainbow-theme .upgrades-panel,
.rainbow-theme .upgrade-item,
.rainbow-theme .upgrade-stats,
.rainbow-theme .btn:not(.btn-golden),
.rainbow-theme .window-header,
.rainbow-theme .section-header,
.rainbow-theme .tab-btn,
.rainbow-theme .achievement-card,
.rainbow-theme .milestone-item,
.rainbow-theme .window-mult-item,
.rainbow-theme .difficulty-upgrade,
.rainbow-theme .bias-bar,
.rainbow-theme .panel-section {
    border-image: var(--rainbow-gradient) 1 !important;
    border-image-slice: 1 !important;
}