/* ===== GLOBAL DARK MODE ===== */
body {
    margin: 0;
    background: #0d0f12;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #e5e5e5;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
}

/* ===== TOPBAR ===== */
.topbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar input,
.topbar button,
.status {
    font-size: 16px;
    padding: 12px 14px;
    height: 48px;
    border-radius: 10px;
    box-sizing: border-box;
}

.topbar input {
    flex: 1;
    background: #1c1f24;
    color: white;
    border: 1px solid #333;
}

.topbar button {
    background: #3a6ff2;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
}
.topbar button:hover {
    background: #2558c7;
}

.status {
    min-width: 80px;
    text-align: center;
    font-weight: 700;
    color: white;
}
.status.idle { background: #555; }
.status.loading { background: #297fb8; }
.status.ok { background: #27ae60; }

/* ===== TEAM CARD ===== */
.team-card {
    background: #1b1e24;
    padding: 20px 24px;
    border-radius: 18px;
    margin-top: 22px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.45);
    border: 1px solid #2b2f36;
}

.team-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px; /* zmniejszony odstęp */
}

/* ===== VARIATION BLOCK ===== */
.variation-block {
    background: #14161a;
    border: 1px solid #2a2d35;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 12px;
}

.variation-header {
    font-size: 15px;
    color: #d0d0d0;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ===== COUNTER BOX ===== */
.counter-box {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    margin-top: 10px;
    cursor: pointer;
    transition: 0.18s ease;
    background: #0e1013; /* zostanie nadpisane w JS */
    box-sizing: border-box;
    border: 2px solid transparent;
}

.counter-box.open {
    transform: scale(1.008);
}

/* HEADER OF COUNTER BOX */
.counter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Leader (większy, wyróżniony) */
.counter-leader {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Reszta składu */
.counter-rest {
    font-size: 14px;
    opacity: 0.9;
}

/* Cron button */
.cron-btn {
    background: rgba(255,255,255,0.14);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    text-transform: uppercase;
}

/* DETAILS (TACTICS + CRON INFO) */
.counter-details {
    margin-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.25);
    padding-top: 10px;
    font-size: 14px;
    white-space: pre-wrap;
    display: none;
    opacity: 0.95;
}

.counter-box.open .counter-details {
    display: block;
}