/* BUTTONS */
.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 8px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.15s, background 0.15s;
}

.nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.add-btn {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    margin-right: 15px;
}

.add-btn:hover {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
}

.config-view-btn {
    border: 1px solid var(--accent-start);
    color: var(--accent-start);
    margin-right: 15px;
}

.config-view-btn:hover {
    background: var(--accent-start);
    color: white;
}

.calc-btn {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--custom);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.calc-btn:hover {
    background: var(--custom);
    color: #000;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.modes-btn {
    background: rgba(168, 85, 247, 0.1) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    color: #c084fc !important;
}

.modes-btn:hover {
    background: #a855f7 !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4) !important;
}

.info-btn {
    position: relative;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    border-radius: 50%;
    background: #1a1d26;
    border: 1px solid #333;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    line-height: 1;
    font-family: serif;
    font-style: italic;
    font-weight: 900;
}

.info-btn:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #60a5fa;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.sub-list-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #888;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 0;
    transition: background 0.15s, color 0.15s;
    margin-left: auto;
}

.sub-list-btn:hover {
    background: var(--accent-start);
    color: white;
    border-color: var(--accent-start);
}

.trait-guide-btn {
    position: absolute;
    bottom: 6px;
    right: 8px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ddd;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trait-guide-btn:hover {
    background: var(--accent-start);
    border-color: var(--accent-start);
    color: #fff;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.action-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    border: none;
    color: white;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.action-btn:hover {
    opacity: 0.9;
}

.action-btn.secondary {
    background: var(--card-border);
    color: #ccc;
}

.action-btn.secondary:hover {
    background: #333;
    color: #fff;
}

.btn-calc-execute {
    width: auto;
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.btn-close-secondary {
    width: auto;
    padding: 10px 25px;
}

.btn-cp-action {
    background: var(--custom);
    color: #000;
}

.header-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.15s;
    line-height: 1;
    padding: 0;
}

.header-toggle-btn:hover {
    color: var(--accent-start);
}

.calc-info-btn {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: var(--custom);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    margin-left: 5px;
}

.calc-info-btn:hover {
    background: var(--custom);
    color: #000;
    box-shadow: 0 0 5px var(--custom);
}

/* TRAIT BUTTONS (topbar right side) */
.trait-tier-btn {
    border: 1px solid var(--accent-start) !important;
    color: var(--accent-start) !important;
    background: rgba(59, 130, 246, 0.08) !important;
    font-size: 0.8rem;
    padding: 7px 16px;
}

.trait-tier-btn:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3) !important;
    color: #fff !important;
}

.trait-stats-btn {
    border: 1px solid var(--accent-end) !important;
    color: var(--accent-end) !important;
    background: rgba(168, 85, 247, 0.08) !important;
    font-size: 0.8rem;
    padding: 7px 16px;
}

.trait-stats-btn:hover {
    background: rgba(168, 85, 247, 0.2) !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3) !important;
    color: #fff !important;
}

/* TOPBAR TOGGLE LABELS */
.nav-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.4px;
    transition: color 0.2s;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    padding: 6px 12px;
    white-space: nowrap;
}

.nav-toggle-label:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

.nav-toggle-label.is-checked {
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--accent-start);
}

/* PAGINATION BUTTON MOBILE Polish */
@media (max-width: 768px) {
    .pg-btn {
        min-width: 42px !important;
        /* Larger hit area for fingers */
        height: 38px !important;
        padding: 0 10px !important;
        font-size: 0.85rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pg-btn.pg-nav {
        min-width: 50px !important;
    }
}

/* UPGRADE PILLS */
.upgrade-toolbar {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--card-border);
    flex-wrap: wrap;
}

.e-pill {
    width: 32px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
    border: 1px solid transparent;
    opacity: 0.6;
}

.e-pill:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.e-pill.is-stat {
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.e-pill.is-special {
    border-color: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    background: rgba(255, 215, 0, 0.05);
}

.e-pill.active {
    opacity: 1;
    border-width: 2px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.e-pill.is-stat.active {
    background: #10b981;
    border-color: #10b981;
    color: #000;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.e-pill.is-special.active {
    background: #ffd700;
    border-color: #ffd700;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}