/* ============================================
   BLORPS App - Raiding Styles
   Raiding Layout, Battle Cards, Active Raids
   ============================================ */

/* ============================================
   Active Raids Arena - Battle Dashboard
   ============================================ */
.active-raids-arena {
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.arena-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 138, 108, 0.18);
}

.arena-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.arena-title .battle-icon {
    width: 28px;
    height: 28px;
    color: var(--pink-main);
    filter: drop-shadow(0 0 10px rgba(255, 138, 108, 0.5));
    animation: icon-pulse 3.2s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); opacity: 0.95; }
    50% { transform: scale(1.06); opacity: 1; }
}

.arena-title h3 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(255, 138, 108, 0.3);
}

.arena-title .raid-count {
    background: linear-gradient(135deg, var(--pink-main), var(--pink-dark));
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 0 14px rgba(255, 138, 108, 0.45);
    animation: count-glow 2.5s ease-in-out infinite;
}

.arena-legend {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-item.attacking .legend-dot {
    background: var(--pink-main);
    box-shadow: 0 0 10px rgba(255, 138, 108, 0.7);
}

.legend-item.defending .legend-dot {
    background: var(--blue-main);
    box-shadow: 0 0 10px rgba(95, 168, 214, 0.7);
}

.arena-battles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .arena-battles {
        grid-template-columns: 1fr;
    }
}

/* Empty State */
.no-active-raids {
    padding: 40px 20px;
    background: radial-gradient(ellipse at center, rgba(127, 234, 245, 0.06) 0%, transparent 70%);
    border-radius: 16px;
}

.empty-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0.7;
}

.empty-arena svg {
    width: 48px;
    height: 48px;
    color: var(--pink-main);
    opacity: 0.5;
    filter: drop-shadow(0 0 8px rgba(255, 138, 108, 0.3));
    animation: float-icon 4s ease-in-out infinite;
}

.empty-arena p {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 1px;
}

.empty-arena span {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 4px;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ============================================
   Battle Card - The Main Event
   ============================================ */
.battle-card {
    position: relative;
    background: linear-gradient(145deg,
        rgba(14, 38, 56, 0.96) 0%,
        rgba(5, 24, 40, 0.98) 100%);
    border: 1px solid rgba(255, 138, 108, 0.28);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    max-width: 420px;
}

.battle-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 138, 108, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(95, 168, 214, 0.08) 0%, transparent 55%);
    pointer-events: none;
}

.battle-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(255, 138, 108, 0.6) 0%,
        rgba(127, 234, 245, 0.25) 50%,
        rgba(95, 168, 214, 0.6) 100%);
    opacity: 0.7;
}

@keyframes battle-surge {
    0%, 100% { opacity: 0.55; transform: translateX(-2%); }
    50% { opacity: 0.95; transform: translateX(2%); }
}

.battle-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 138, 108, 0.45);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 138, 108, 0.12);
}

.battle-card.attacking {
    border-color: rgba(255, 138, 108, 0.35);
}

.battle-card.defending {
    border-color: rgba(95, 168, 214, 0.35);
}

/* Battle Header */
.battle-header {
    position: relative;
    z-index: 2;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg,
        rgba(255, 138, 108, 0.06) 0%,
        transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.battle-role {
    display: flex;
    align-items: center;
    gap: 8px;
}

.battle-role-badge {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.battle-card.attacking .battle-role-badge {
    background: linear-gradient(135deg, rgba(255, 138, 108, 0.22), rgba(226, 95, 62, 0.16));
    color: var(--pink-main);
    border: 1px solid rgba(255, 138, 108, 0.35);
}

.battle-card.defending .battle-role-badge {
    background: linear-gradient(135deg, rgba(95, 168, 214, 0.22), rgba(44, 111, 154, 0.16));
    color: var(--blue-main);
    border: 1px solid rgba(95, 168, 214, 0.35);
}

.battle-phase {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phase-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    animation: phase-blink 1.5s ease-in-out infinite;
}

.phase-indicator.your-turn {
    background: var(--green-main);
    box-shadow: 0 0 12px var(--green-main);
    animation: pulseGreen 1.5s ease-in-out infinite;
}

.phase-indicator.waiting {
    background: #ffc107;
    box-shadow: 0 0 8px #ffc107;
    animation: phase-blink 0.8s ease-in-out infinite;
}

.phase-indicator.ready {
    background: var(--pink-main);
    box-shadow: 0 0 12px rgba(255, 138, 108, 0.7);
    animation: phase-ready 1.2s ease-in-out infinite;
}

@keyframes phase-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes phase-ready {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.phase-text {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phase-text.your-turn {
    color: var(--green-main);
}

.phase-text.ready {
    color: var(--pink-main);
}

/* Battle Arena - Teams Face Off (Vertical Stack Layout) */
.battle-arena {
    position: relative;
    z-index: 2;
    padding: 6px 14px 4px 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

/* Team Side - Vertical Stack Layout */
.battle-team {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}

.battle-team.attacker,
.battle-team.defender {
    align-items: center;
}

.team-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
    min-width: 70px;
}

/* Defender wallet address in battle cards */
.defender-wallet {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: none;
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.battle-team.defender .team-label {
    display: flex !important;
    opacity: 1;
}

.team-portraits {
    display: flex;
    gap: 0;
    flex-direction: row;
}

.battle-team.attacker .team-portraits,
.battle-team.defender .team-portraits {
    flex-direction: row;
}

.battle-portrait {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    margin-left: -8px;
    transition: all 0.3s ease;
}

.battle-portrait:first-child {
    margin-left: 0;
}

.battle-team.attacker .battle-portrait {
    border-color: rgba(255, 138, 108, 0.35);
}

.battle-team.defender .battle-portrait {
    border-color: rgba(95, 168, 214, 0.35);
}

.battle-portrait:hover {
    transform: translateY(-4px) scale(1.1);
    z-index: 10;
}

.battle-portrait svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.battle-portrait.reinforcement {
    border-style: dashed;
    opacity: 0.6;
}

.battle-portrait.reinforcement::after {
    content: '+';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.3);
}

/* Team Stats */
.team-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-bp {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
}

.battle-team.attacker .team-bp {
    color: var(--pink-main);
    text-shadow: 0 0 20px rgba(255, 138, 108, 0.55);
}

.battle-team.defender .team-bp {
    color: var(--blue-main);
    text-shadow: 0 0 20px rgba(95, 168, 214, 0.55);
}

.bp-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
}

/* VS Divider - Centered Compact */
.battle-vs {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    margin: 0;
    flex-shrink: 0;
}

.vs-line {
    display: none;
}

.vs-icon {
    width: 34px;
    height: 34px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 50%;
    border: none;
    flex-shrink: 0;
}

/* Hide the animated spinning ring */
.vs-icon::before {
    display: none;
}

@keyframes vs-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vs-icon::after {
    content: 'VS';
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: white;
    text-shadow:
        0 0 8px rgba(255, 138, 108, 0.6),
        0 0 16px rgba(127, 234, 245, 0.35),
        0 0 24px rgba(95, 168, 214, 0.35);
    position: relative;
    z-index: 2;
}

/* Energy clash effect */
.vs-clash {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 1;
}

.vs-clash::before,
.vs-clash::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    top: 50%;
}

.vs-clash::before {
    left: 0;
    background: linear-gradient(to right, transparent, rgba(255, 138, 108, 0.7));
    filter: blur(0.6px);
    animation: clash-left 2.4s ease-in-out infinite;
}

.vs-clash::after {
    right: 0;
    background: linear-gradient(to left, transparent, rgba(95, 168, 214, 0.7));
    filter: blur(0.6px);
    animation: clash-right 2.4s ease-in-out infinite;
}

@keyframes clash-left {
    0%, 100% { transform: translateX(-4px) translateY(-50%); opacity: 0.35; }
    50% { transform: translateX(4px) translateY(-50%); opacity: 0.9; }
}

@keyframes clash-right {
    0%, 100% { transform: translateX(4px) translateY(-50%); opacity: 0.35; }
    50% { transform: translateX(-4px) translateY(-50%); opacity: 0.9; }
}

/* Battle Footer - Prize & Timer */
.battle-footer {
    position: relative;
    z-index: 2;
    padding: 6px 12px 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: transparent;
    border-top: none;
}

/* Prize Display */
.battle-prize {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.prize-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.prize-amount {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--yellow-main);
    text-shadow: 0 0 15px rgba(255, 161, 87, 0.3);
}

.prize-amount svg {
    width: 18px;
    height: 18px;
    color: var(--yellow-main);
}

/* Countdown Timer */
.battle-timer {
    /* Label-over-value column, matching the Potential Prize block beside
       it - the old boxed chip read as a button. */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
}

.timer-label {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 600;
}

.timer-value {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-main);
}

.timer-value.urgent {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
    animation: timer-urgent 0.5s ease-in-out infinite;
}

@keyframes timer-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.timer-value.expiring {
    color: #f59e0b;
}

/* View Battle Button */
.battle-action {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.battle-action:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

.battle-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.battle-card .battle-action {
    background: linear-gradient(135deg, var(--green-light), var(--green-main));
    color: var(--purple-dark);
    box-shadow: 0 4px 15px rgba(45, 212, 233, 0.25);
}

.battle-action:hover {
    transform: translateY(-1px);
}

.battle-card .battle-action:hover {
    box-shadow: 0 6px 25px rgba(45, 212, 233, 0.4);
}

.battle-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: button-shine 3s ease-in-out infinite;
}

@keyframes button-shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* Pulsing border for active battles */
.battle-card.your-turn {
    animation: your-turn-pulse 2s ease-in-out infinite;
}

@keyframes your-turn-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
    }
}

/* Battle card energy border effect */
.battle-card.your-turn::before {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(74, 222, 128, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(74, 222, 128, 0.1) 0%, transparent 50%);
}

/* Settlement ready state */
.battle-card.settlement-ready {
    animation: settlement-pulse 2s ease-in-out infinite;
}

@keyframes settlement-pulse {
    0%, 100% {
        border-color: rgba(255, 138, 108, 0.35);
    }
    50% {
        border-color: rgba(255, 138, 108, 0.8);
    }
}

/* Responsive adjustments for battle cards */
@media (max-width: 400px) {
    .battle-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .battle-action {
        width: 100%;
        text-align: center;
    }

    .battle-portrait {
        width: 44px;
        height: 44px;
    }

    .team-label {
        min-width: auto;
        font-size: 9px;
    }

    .team-bp {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .arena-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* ============================================
   Team Overlay — School of fish (water blue)
   ============================================ */
.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(95, 168, 214, 0.10) 0%,
        rgba(5, 24, 40, 0.78) 35%,
        rgba(5, 24, 40, 0.88) 100%
    );
    backdrop-filter: blur(3px) saturate(1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 16px;
    overflow: hidden;
    pointer-events: none; /* Allow clicks to pass through to card */
}

/* Soft drifting current */
.team-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 30% at 25% 25%, rgba(179, 217, 242, 0.10) 0%, transparent 65%),
        radial-gradient(ellipse 90% 30% at 75% 75%, rgba(95, 168, 214, 0.08) 0%, transparent 65%);
    animation: caustic-drift 11s ease-in-out infinite;
}

/* Icon — soft circular frame */
.team-overlay .team-icon-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

/* Halo ring */
.team-overlay .team-icon-wrap::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1.5px solid rgba(179, 217, 242, 0.55);
    border-radius: 50%;
    animation: halo-pulse 3s ease-in-out infinite;
}

/* Solid disc behind the icon */
.team-overlay .team-icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 35% 30%,
        rgba(95, 168, 214, 0.22) 0%,
        rgba(8, 26, 42, 0.92) 70%);
    border: 1px solid rgba(179, 217, 242, 0.35);
    border-radius: 50%;
}

.team-overlay .team-icon {
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
    color: #b3d9f2;
    filter: drop-shadow(0 0 6px rgba(95, 168, 214, 0.6));
}

.team-overlay .team-icon svg {
    width: 100%;
    height: 100%;
}

/* Label pill */
.team-overlay .team-label {
    font-family: var(--font-display, 'Lilita One', cursive);
    font-size: 10px;
    font-weight: 700;
    color: #d6ecf8;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 5px 14px;
    background: rgba(95, 168, 214, 0.12);
    border: 1px solid rgba(179, 217, 242, 0.4);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 8px rgba(95, 168, 214, 0.4);
}

/* Soft shimmer sweep across the label */
.team-overlay .team-label::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(179, 217, 242, 0.25),
        transparent);
    animation: shine-sweep 4s ease-in-out infinite;
}

/* Bubble nodes */
.team-overlay .team-nodes {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.team-overlay .team-nodes .node {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.65) 0%,
        rgba(179, 217, 242, 0.55) 50%,
        rgba(95, 168, 214, 0.2) 100%);
    border: 1px solid rgba(179, 217, 242, 0.45);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(95, 168, 214, 0.55);
    animation: bubble-pulse 2s ease-in-out infinite;
}

.team-overlay .team-nodes .node:nth-child(2) { animation-delay: 0.3s; }
.team-overlay .team-nodes .node:nth-child(3) { animation-delay: 0.6s; }

.team-overlay .team-nodes .connector {
    width: 14px;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(179, 217, 242, 0.7),
        rgba(95, 168, 214, 0.2));
    border-radius: 1px;
}

/* Disband Team Button */
.disband-team-btn {
    pointer-events: auto; /* Make clickable through overlay */
    margin-top: 12px;
    padding: 6px 14px;
    font-family: var(--font-display, 'Orbitron', sans-serif);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 20;
}

.disband-team-btn:hover {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.7);
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.3);
    transform: scale(1.05);
}

.disband-team-btn:active {
    transform: scale(0.98);
}

.disband-team-btn:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

.disband-team-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}


.team-slot .selected-blorp > svg {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.team-slot .selected-blorp > span {
    font-size: 9px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
    line-height: 1.2;
}

/* Hide any stat blocks that might appear in team slots */
.team-slot .stat-block,
.team-slot .blorp-card-stats {
    display: none !important;
}

.team-slot .selected-blorp .clear-slot-btn {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--red-main, #ef4444);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0 !important;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.team-slot .selected-blorp .clear-slot-btn svg {
    width: 10px;
    height: 10px;
}

.team-slot:hover .selected-blorp .clear-slot-btn {
    opacity: 1 !important;
}

.team-slot .selected-blorp .clear-slot-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Team Source Tabs */
.team-source-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.team-source-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-source-tab svg {
    width: 16px;
    height: 16px;
}

.team-source-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-active);
}

.team-source-tab.active {
    background: rgba(74, 222, 128, 0.1);
    border-color: var(--green-main);
    color: var(--green-main);
}

/* Team Source Content */
.team-source-content {
    display: none;
}

.team-source-content.active {
    display: block;
}

/* Existing Teams List */
.existing-teams-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.existing-team-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.existing-team-card:hover {
    background: rgba(74, 222, 128, 0.08);
    border-color: var(--green-main);
}

.existing-team-card.selected {
    background: rgba(74, 222, 128, 0.12);
    border-color: var(--green-main);
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.15);
}

.existing-team-blorps {
    display: flex;
    gap: 4px;
}

.existing-team-blorps .mini-blorp {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.existing-team-blorps .mini-blorp svg {
    width: 100%;
    height: 100%;
}

.existing-team-info {
    flex: 1;
}

.existing-team-info .team-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.existing-team-info .team-stats {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.no-teams-message {
    text-align: center;
    padding: 24px;
    color: var(--text-dim);
}

.no-teams-message p {
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.no-teams-message span {
    font-size: 12px;
}

/* Selected Team Preview */
.selected-team-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 10px;
}

.team-preview-blorps {
    display: flex;
    gap: 6px;
}

.team-preview-blorps .mini-blorp {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.team-preview-blorps .mini-blorp svg {
    width: 100%;
    height: 100%;
}

.team-preview-stats {
    display: flex;
    gap: 16px;
    margin-left: auto;
}

.preview-stat {
    text-align: center;
}

.preview-stat .stat-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-stat .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--green-main);
}

/* Step states - Step 2 (team selection) always visible */
.team-selection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}

.team-selection-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.team-selection-row:hover {
    background: rgba(74, 222, 128, 0.06);
    border-color: rgba(74, 222, 128, 0.4);
}

.team-selection-row.selected {
    background: rgba(74, 222, 128, 0.1);
    border-color: var(--green-main);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.15);
}

/* Raid cooldown (game v1.10.0): the team just attacked and is resting -
   inert row, dimmed, live countdown under the stats. */
.team-selection-row.on-cooldown {
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.6);
}

.team-selection-row.on-cooldown:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border-subtle);
}

.team-selection-row .team-row-cooldown {
    font-size: 12px;
    color: var(--orange-warn, #f59e0b);
    margin-top: 2px;
    font-weight: 600;
}

.team-selection-row .team-row-cooldown [data-countdown] {
    font-variant-numeric: tabular-nums;
}

.team-row-badge {
    position: absolute;
    top: -6px;
    left: 12px;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.team-row-badge.new {
    background: linear-gradient(135deg, var(--green-main), #22d3ee);
    color: #0a0a12;
}

.team-row-blorps {
    display: flex;
    gap: 4px;
}

.team-row-blorps .mini-blorp {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.team-row-blorps .mini-blorp svg {
    width: 100%;
    height: 100%;
}

.team-row-info {
    flex: 1;
}

.team-row-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.team-row-stats {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
}

.team-row-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.team-row-check svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    color: #0a0a12;
    transition: opacity 0.2s ease;
}

.team-selection-row.selected .team-row-check {
    background: var(--green-main);
    border-color: var(--green-main);
}

.team-selection-row.selected .team-row-check svg {
    opacity: 1;
}

.team-selection-row.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.team-selection-row.max-teams-warning {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.team-selection-row.max-teams-warning .team-row-name {
    color: #ef4444;
}

.team-count-info {
    color: var(--text-dim);
    font-size: 12px;
}

.team-count-info.at-max {
    color: #ef4444;
    font-weight: 600;
}

.no-teams-message {
    text-align: center;
    padding: 24px;
    color: var(--text-dim);
}

.no-teams-message p {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.no-teams-message span {
    font-size: 12px;
}

#miningStep3 {
    opacity: 0.5;
    pointer-events: none;
}

#miningStep3.active {
    opacity: 1;
    pointer-events: auto;
}

.mine-options {
    display: flex;
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
}

.mine-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 200px;
}

.mine-option:hover,
.mine-option.selected {
    background: rgba(74, 222, 128, 0.1);
    border-color: var(--green-main);
}

.mine-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.mine-option.disabled .coming-soon-badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

.mine-icon svg {
    width: 40px;
    height: 40px;
}

.mine-info {
    flex: 1;
}

.mine-name {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.mine-reward {
    font-size: 13px;
    color: var(--green-main);
}

.mine-duration {
    font-size: 13px;
    color: var(--text-dim);
}

.mining-summary {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.summary-value {
    font-weight: 700;
    color: var(--text-main);
    /* Multi-line values (Est. Daily Yield + its pool-share note) must stay
       right-aligned like the single-line rows ("4 hours"); without this the
       wrapped note block dragged the whole cell's text to the left edge. */
    text-align: right;
    max-width: 70%;
}

.summary-value.highlight {
    color: var(--green-main);
}

.start-mining-btn {
    width: 100%;
    padding: 14px;
    background: var(--green-main);
    border: none;
    border-radius: 10px;
    color: var(--purple-dark);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s ease;
}

.start-mining-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3);
}

.start-mining-btn:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

.start-mining-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   Buy Button - Rarity-Themed
   ============================================ */
.buy-btn {
    width: 100%;
    padding: 13px 16px;
    background: linear-gradient(135deg, var(--green-main), #3bc974);
    border: none;
    border-radius: 10px;
    color: var(--purple-dark);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.buy-btn:hover::before {
    left: 100%;
}

.buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.35);
}

.buy-btn:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

.buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Legendary Buy Button */
.listing-card[data-rarity="legendary"] .buy-btn {
    background: linear-gradient(135deg, #ffd93d, #f0c030);
    color: #2d1b4e;
}

.listing-card[data-rarity="legendary"] .buy-btn:hover {
    box-shadow: 0 6px 25px rgba(255, 217, 61, 0.4);
}

/* Epic Buy Button */
.listing-card[data-rarity="epic"] .buy-btn {
    background: linear-gradient(135deg, #ff6bcd, #e05ab8);
    color: #2d1b4e;
}

.listing-card[data-rarity="epic"] .buy-btn:hover {
    box-shadow: 0 6px 25px rgba(255, 107, 205, 0.35);
}

/* Rare Buy Button */
.listing-card[data-rarity="rare"] .buy-btn {
    background: linear-gradient(135deg, #6bcfff, #55b8e8);
    color: #1a1a2e;
}

.listing-card[data-rarity="rare"] .buy-btn:hover {
    box-shadow: 0 6px 25px rgba(107, 207, 255, 0.35);
}

/* Common Buy Button */
.listing-card[data-rarity="common"] .buy-btn {
    background: linear-gradient(135deg, #8a8a9a, #707080);
    color: #fff;
}

.listing-card[data-rarity="common"] .buy-btn:hover {
    box-shadow: 0 6px 20px rgba(100, 100, 120, 0.3);
}

/* My Listings Section */
.my-listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.my-listings-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
}

.create-listing-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--green-main);
    border: none;
    border-radius: 10px;
    color: var(--purple-dark);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-listing-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.3);
}

.create-listing-btn:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

.create-listing-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.create-listing-btn.secondary {
    background: rgba(74, 222, 128, 0.15);
    color: var(--green-main);
    border: 1px solid var(--border-active);
}

.create-listing-btn svg {
    width: 18px;
    height: 18px;
}

/* My Listings Header */
.my-listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.listings-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.listings-title-group h3 {
    font-family: var(--font-display);
    font-size: 22px;
    margin: 0;
}

.listings-count {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(107, 207, 255, 0.2));
    border: 1px solid rgba(74, 222, 128, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--green-main);
}

/* My Listings Grid */
.my-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Listing Card - Premium Design */
.my-listing-card {
    position: relative;
    background: linear-gradient(135deg,
        rgba(26, 26, 46, 0.9),
        rgba(22, 33, 62, 0.8));
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: center;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.my-listing-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(74, 222, 128, 0.4),
        rgba(107, 207, 255, 0.2),
        rgba(255, 107, 205, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.my-listing-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.4);
}

.my-listing-card:hover::before {
    opacity: 1;
}

/* Status Badge */
.listing-status-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--green-main);
    text-transform: uppercase;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--green-main);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0); }
}

/* Showcase Container */
.listing-showcase {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(255, 222, 107, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.listing-blorp-svg {
    width: 90px;
    height: 90px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Card Content */
.listing-card-content {
    flex: 1;
    min-width: 0;
}

.listing-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.listing-header-row h4 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.listing-rarity-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.listing-rarity-tag.legendary {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.25), rgba(255, 180, 50, 0.15));
    color: var(--yellow-main);
    border: 1px solid rgba(255, 217, 61, 0.3);
}
.listing-rarity-tag.epic {
    background: linear-gradient(135deg, rgba(255, 107, 205, 0.25), rgba(200, 80, 180, 0.15));
    color: var(--pink-main);
    border: 1px solid rgba(255, 107, 205, 0.3);
}
.listing-rarity-tag.rare {
    background: linear-gradient(135deg, rgba(107, 207, 255, 0.25), rgba(80, 160, 220, 0.15));
    color: var(--blue-main);
    border: 1px solid rgba(107, 207, 255, 0.3);
}
.listing-rarity-tag.common {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.listing-stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.stat-chip svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

/* Price Block */
.listing-price-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.listing-price-block .price-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.price-display .price-amount {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--green-main);
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.price-display .price-token {
    font-size: 12px;
    font-weight: 600;
    color: var(--green-light);
    opacity: 0.8;
}

.listing-price-block .time-listed {
    font-size: 11px;
    color: var(--text-dim);
    opacity: 0.7;
}

/* Actions */
.listing-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.edit-listing-btn,
.cancel-listing-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 110px;
}

.edit-listing-btn svg,
.cancel-listing-btn svg {
    width: 14px;
    height: 14px;
}

.edit-listing-btn {
    background: linear-gradient(135deg, rgba(107, 207, 255, 0.15), rgba(107, 207, 255, 0.08));
    border: 1px solid rgba(107, 207, 255, 0.3);
    color: var(--blue-light);
}

.edit-listing-btn:hover {
    background: linear-gradient(135deg, rgba(107, 207, 255, 0.25), rgba(107, 207, 255, 0.15));
    border-color: rgba(107, 207, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(107, 207, 255, 0.2);
}

.cancel-listing-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.cancel-listing-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.12));
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
}

.edit-listing-btn:focus-visible,
.cancel-listing-btn:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

.edit-listing-btn:disabled,
.cancel-listing-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* CTA Section */
.listings-cta-section {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 32px;
    background: linear-gradient(135deg,
        rgba(74, 222, 128, 0.05),
        rgba(107, 207, 255, 0.03));
    border: 1px dashed rgba(74, 222, 128, 0.25);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.listings-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-decoration {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.cta-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(74, 222, 128, 0.3);
    border-radius: 50%;
    animation: ring-expand 3s ease-out infinite;
}

.cta-ring.delay {
    animation-delay: 1.5s;
}

@keyframes ring-expand {
    0% { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.cta-icon {
    width: 80px;
    height: 80px;
    position: relative;
    z-index: 1;
}

.cta-text {
    flex: 1;
}

.cta-text h4 {
    font-family: var(--font-display);
    font-size: 18px;
    margin: 0 0 6px 0;
    background: linear-gradient(135deg, var(--green-main), var(--blue-main));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-text p {
    font-size: 14px;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.5;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--green-main), #3bc974);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--purple-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cta-button svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.35);
}

.cta-button:hover svg {
    transform: translateX(4px);
}

.cta-button:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

.cta-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   Reinforcement Selector Styles - Terminal Design
   ============================================ */

.reinforce-terminal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    align-items: start;
}

/* Each panel scrolls independently - the old single scroll container put
   the mercenary panel below the fold. */
.reinforce-terminal .reinforce-list {
    max-height: 360px;
    overflow-y: auto;
}

/* Override modal-blorps grid when reinforce-terminal is inside */
.modal-blorps:has(.reinforce-terminal) {
    display: block;
}

@media (max-width: 640px) {
    .reinforce-terminal {
        grid-template-columns: 1fr;
    }
}

.reinforce-section {
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
}

.reinforce-section.owned-section {
    border-left: 3px solid var(--green-main);
}

.reinforce-section.merc-section {
    border-left: 3px solid #f0b429;
}

.reinforce-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reinforce-section .section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.section-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-badge.free {
    background: rgba(157, 255, 107, 0.15);
    color: var(--green-main);
    border: 1px solid rgba(157, 255, 107, 0.3);
}

.section-badge.cost {
    background: rgba(240, 180, 41, 0.12);
    color: #f0b429;
    border: 1px solid rgba(240, 180, 41, 0.25);
}

.reinforce-list {
    padding: 6px;
    max-height: 340px;
    overflow-y: auto;
}

.reinforce-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    animation: rowFadeIn 0.2s ease forwards;
    animation-delay: calc(var(--row-idx) * 0.03s);
    opacity: 0;
}

@keyframes rowFadeIn {
    to { opacity: 1; }
}

.reinforce-row.own {
    border-left-color: rgba(157, 255, 107, 0.4);
}

.reinforce-row.merc {
    border-left-color: rgba(240, 180, 41, 0.4);
}

.reinforce-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.reinforce-row.own:hover {
    background: rgba(157, 255, 107, 0.06);
    border-left-color: var(--green-main);
    box-shadow: 0 0 12px rgba(157, 255, 107, 0.1);
}

.reinforce-row.merc:hover {
    background: rgba(240, 180, 41, 0.06);
    border-left-color: #f0b429;
    box-shadow: 0 0 12px rgba(240, 180, 41, 0.1);
}

.row-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.row-avatar svg {
    width: 100%;
    height: 100%;
}

.row-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.row-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-id {
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.row-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 8px;
    background: rgba(157, 255, 107, 0.08);
    border-radius: 4px;
    min-width: 50px;
}

.row-stat .stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--green-main);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.row-stat .stat-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.row-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 8px;
    background: rgba(240, 180, 41, 0.08);
    border-radius: 4px;
    min-width: 55px;
}

.row-price .price-value {
    font-size: 13px;
    font-weight: 700;
    color: #f0b429;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.row-price .price-token {
    font-size: 8px;
    font-weight: 600;
    color: rgba(240, 180, 41, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.row-action {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.15s ease;
}

.row-action .select-check {
    width: 14px;
    height: 14px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.reinforce-row:hover .row-action {
    border-color: rgba(255, 255, 255, 0.25);
}

.reinforce-row.own:hover .row-action {
    border-color: var(--green-main);
    background: rgba(157, 255, 107, 0.1);
}

.reinforce-row.own:hover .select-check {
    opacity: 1;
    stroke: var(--green-main);
}

.reinforce-row.merc:hover .row-action {
    border-color: #f0b429;
    background: rgba(240, 180, 41, 0.1);
}

.reinforce-row.merc:hover .select-check {
    opacity: 1;
    stroke: #f0b429;
}

.reinforce-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

.reinforce-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

/* ============================================
   Battle Card Override Styles - Enhanced Layout
   ============================================ */

/* Battle Arena - Vertical Stack Layout */
.battle-arena {
    position: relative;
    z-index: 2;
    padding: 6px 14px 4px 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

/* Team Sections */
.battle-team {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    margin: 0;
    transition: all 0.2s ease;
}

.battle-team.attacker {
    border-left-color: rgba(236, 72, 153, 0.6);
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.1) 0%, rgba(236, 72, 153, 0.02) 100%);
}

.battle-team.defender {
    border-left-color: rgba(77, 171, 247, 0.6);
    background: linear-gradient(90deg, rgba(77, 171, 247, 0.1) 0%, rgba(77, 171, 247, 0.02) 100%);
}

/* Team hover glow */
.battle-team.attacker:hover {
    border-color: rgba(236, 72, 153, 0.3);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.15);
}

.battle-team.defender:hover {
    border-color: rgba(77, 171, 247, 0.3);
    box-shadow: 0 0 15px rgba(77, 171, 247, 0.15);
}

/* Team Labels - Show both attacker "You" and defender wallet */
.battle-team.attacker .team-label,
.battle-team.defender .team-label {
    display: block;
}

/* Attacker "You" label styling - positioned between portraits and BP */
.attacker-label-right {
    order: 1;
    margin-left: 8px;
    margin-right: 8px;
}

.battle-team.attacker .team-portraits {
    order: 0;
}

.battle-team.attacker .team-stats {
    order: 2;
}

.attacker-label {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: none;
    color: rgba(236, 72, 153, 0.8);
}

/* Portraits Container */
.team-portraits {
    display: flex;
    align-items: center;
}

/* Battle Portraits - Compact */
.battle-portrait {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(30, 20, 40, 0.9), rgba(15, 10, 25, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.08);
    margin-left: -8px;
    transition: all 0.25s ease;
    overflow: hidden;
}

.battle-portrait:first-child {
    margin-left: 0;
}

.battle-team.attacker .battle-portrait {
    border-color: rgba(236, 72, 153, 0.35);
}

.battle-team.defender .battle-portrait {
    border-color: rgba(77, 171, 247, 0.35);
}

.battle-portrait:hover {
    transform: translateY(-4px) scale(1.1);
    z-index: 10;
}

/* Team Stats */
.team-stats {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-left: auto;
}

/* BP Display */
.team-bp {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bp-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-weight: 600;
}

.battle-team.attacker .team-bp {
    color: #f472b6;
    text-shadow: 0 0 20px rgba(236, 72, 153, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.battle-team.defender .team-bp {
    color: #7dd3fc;
    text-shadow: 0 0 20px rgba(77, 171, 247, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* VS Divider - Centered Compact */
.battle-vs {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
    position: relative;
    gap: 10px;
    margin: -2px 0;
}

.vs-line {
    display: none;
}

.vs-icon {
    width: 34px;
    height: 34px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 50%;
    border: none;
    flex-shrink: 0;
}

/* Hide the animated spinning ring */
.vs-icon::before {
    display: none;
}

/* VS Text - Glowing */
.vs-icon::after {
    content: 'VS';
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: white;
    text-shadow:
        0 0 8px rgba(255, 138, 108, 0.6),
        0 0 16px rgba(127, 234, 245, 0.35),
        0 0 24px rgba(95, 168, 214, 0.35);
}

/* Battle Footer - Compact Row */
.battle-footer {
    position: relative;
    z-index: 2;
    padding: 6px 12px 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: transparent;
    border-top: none;
}

/* Prize Display */
.battle-prize {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.prize-label {
    font-family: var(--font-body);
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    white-space: nowrap;
}

.prize-amount {
    font-family: var(--font-display);
    font-size: 16px;
    /* Gold like every other $ROE amount in the app. */
    color: var(--yellow-main);
    display: flex;
    align-items: center;
    gap: 4px;
    text-shadow: 0 0 12px rgba(255, 161, 87, 0.3);
}

.prize-amount svg {
    width: 14px;
    height: 14px;
    filter: drop-shadow(0 0 4px rgba(255, 161, 87, 0.3));
}

/* Timer Box */
.battle-timer {
    /* Label-over-value column, matching the Potential Prize block beside
       it - the old boxed chip read as a button. */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
}

.timer-label {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 600;
}

.timer-value {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-main);
}

.timer-value.urgent {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
    animation: timerBlink 0.5s ease-in-out infinite;
}

.timer-value.expiring {
    color: #f59e0b;
}

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

/* View Battle Button - Premium */
.battle-action {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* One neutral primary for both roles - "View Battle" is the same action
   either way, and the app's primary is cyan (hero / action buttons). */
.battle-card.attacking .battle-action,
.battle-card.defending .battle-action {
    background: linear-gradient(135deg, var(--green-light) 0%, var(--green-main) 100%);
    color: var(--purple-dark);
    box-shadow:
        0 2px 12px rgba(45, 212, 233, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.battle-action:hover {
    transform: translateY(-1px);
}

.battle-card.attacking .battle-action:hover,
.battle-card.defending .battle-action:hover {
    box-shadow:
        0 6px 20px rgba(45, 212, 233, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.battle-action:active {
    transform: translateY(0);
}

/* Your Turn Highlight */
.battle-card.your-turn {
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.15);
}

/* Settlement Ready State */
.battle-card.settlement-ready {
    border-color: rgba(255, 138, 108, 0.55);
    animation: settlementGlow 2.4s ease-in-out infinite;
}

@keyframes settlementGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 138, 108, 0.22); }
    50% { box-shadow: 0 0 28px rgba(255, 138, 108, 0.4); }
}

/* Arena Section Container */
.active-raids-arena {
    background:
        radial-gradient(ellipse at 15% 0%, rgba(255, 138, 108, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(95, 168, 214, 0.05) 0%, transparent 55%),
        linear-gradient(180deg, rgba(10, 38, 56, 0.7) 0%, rgba(5, 24, 40, 0.55) 100%);
    border: 1px solid rgba(255, 138, 108, 0.18);
    border-radius: 20px;
    padding: 20px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Arena Title */
.arena-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.arena-title h3 {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 2px;
    color: white;
    margin: 0;
}

.arena-title .battle-icon {
    width: 24px;
    height: 24px;
    color: var(--pink-main);
    filter: drop-shadow(0 0 6px rgba(255, 138, 108, 0.4));
}

.arena-title .raid-count {
    background: linear-gradient(135deg, var(--pink-main), var(--pink-dark));
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    color: white;
}

/* Battle Cards Container */
.battle-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Empty State */
.no-active-raids {
    padding: 40px 20px;
    text-align: center;
}

.empty-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.empty-arena svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

.empty-arena p {
    font-family: var(--font-display);
    font-size: 14px;
    margin: 0;
}

.empty-arena span {
    font-size: 12px;
    opacity: 0.6;
}

/* ============================================
   Raiding Tab Container - Soft caustic backdrop
   ============================================ */
#raidingTab {
    position: relative;
}

#raidingTab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 60% 35% at 30% 20%, rgba(127, 234, 245, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 50% 30% at 75% 50%, rgba(255, 138, 108, 0.04) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.7;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 0%, transparent 75%);
}

/* Page Header - Dramatic title treatment */
#raidingTab > h2 {
    font-family: var(--font-display);
    font-size: 42px;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 0%, var(--pink-light) 55%, var(--pink-main) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}

#raidingTab > h2::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--pink-main), transparent);
    border-radius: 2px;
}

#raidingTab > p {
    font-size: 15px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ============================================
   History Section - Battle Record Cards
   ============================================ */
.history-card {
    /* App-standard navy (matches the active-raid card) - was pre-rebrand
       purple-black. NOTE: my-blorps.css also defines .history-card; keep
       the two in the same palette. */
    background: linear-gradient(165deg,
        rgba(14, 38, 56, 0.95) 0%,
        rgba(5, 24, 40, 0.98) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.history-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.history-card.victory {
    border-color: rgba(74, 222, 128, 0.2);
}

.history-card.victory:hover {
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(74, 222, 128, 0.15);
}

.history-card.defeat {
    border-color: rgba(255, 82, 82, 0.2);
}

.history-card.defeat:hover {
    border-color: rgba(255, 82, 82, 0.4);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 82, 82, 0.15);
}

/* Outcome Banner */
.history-card.victory .history-outcome {
    background: linear-gradient(90deg,
        #4ade80 0%,
        #22c55e 30%,
        rgba(74, 222, 128, 0.2) 70%,
        transparent 100%);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.5);
}

.history-card.defeat .history-outcome {
    background: linear-gradient(90deg,
        #ff5252 0%,
        #ef4444 30%,
        rgba(255, 82, 82, 0.2) 70%,
        transparent 100%);
    box-shadow: 0 0 12px rgba(255, 82, 82, 0.5);
}

/* Result Badge */
.history-card.victory .result-badge {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.25), rgba(34, 197, 94, 0.15));
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.2);
}

.history-card.defeat .result-badge {
    background: linear-gradient(135deg, rgba(255, 82, 82, 0.25), rgba(239, 68, 68, 0.15));
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.2);
}

/* History Portrait Hover */
.history-card:hover .history-portrait {
    transform: scale(1.05);
}

/* Reward Amount */
.history-card .reward-amount {
    font-weight: 700;
    font-size: 15px;
}

.history-card.victory .reward-amount {
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.history-card.defeat .reward-amount {
    color: rgba(255, 255, 255, 0.5);
    text-shadow: none;
}

/* Collapsed History - Horizontal Scroll */
.history-battles.collapsed {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -4px;
    max-height: none;
}

.history-battles.collapsed::-webkit-scrollbar {
    display: none;
}

.history-battles.collapsed .history-card {
    flex: 0 0 360px;
    min-width: 360px;
    max-width: 360px;
    scroll-snap-align: start;
}

/* (Right-edge scroll fade removed 2026-07-06 - its fixed offsets never
   lined up with the cards, so it read as a misaligned dark shadow over
   the last card. The partially-visible next card is scroll hint enough.) */

/* ============================================
   Raid Target Cards
   ============================================ */
.raid-target-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, transparent, var(--pink-main), transparent);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.raid-target-card:hover::after {
    opacity: 1;
}

/* ============================================
   Attack Button - Tactical Style
   ============================================ */
.attack-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.attack-btn:hover::before {
    left: 100%;
}

.attack-btn:active {
    transform: scale(0.98);
}

.attack-btn:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

.attack-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   Raid Team Selector
   ============================================ */
.raid-team-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pink-main), var(--purple-glow), var(--pink-main));
    background-size: 200% 100%;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Team Divider */
.raid-team-divider span {
    background: rgba(15, 10, 25, 0.95);
    padding: 0 16px;
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Team List Scrollbar */
.raid-team-list {
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(236, 72, 153, 0.3) transparent;
}

.raid-team-list::-webkit-scrollbar {
    width: 6px;
}

.raid-team-list::-webkit-scrollbar-track {
    background: transparent;
}

.raid-team-list::-webkit-scrollbar-thumb {
    background: rgba(236, 72, 153, 0.3);
    border-radius: 3px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
/* ============================================
   Additional Raid Styles
   ============================================ */

/* Raid Info Banner */
.raid-info-banner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.05));
    pointer-events: none;
}

/* Active Raids Arena - soft caustic shimmer */
.active-raids-arena::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 138, 108, 0.55) 25%,
        rgba(127, 234, 245, 0.45) 55%,
        rgba(95, 168, 214, 0.5) 80%,
        transparent 100%);
    filter: blur(0.5px);
    animation: arena-caustic 6s ease-in-out infinite;
}

@keyframes arena-caustic {
    0%, 100% { opacity: 0.45; transform: translateX(-4%) scaleX(0.92); }
    50% { opacity: 0.85; transform: translateX(4%) scaleX(1); }
}

/* Target Team Blorps Hover States */
.raid-target-card:hover .target-team-blorps .mini-blorp {
    border-color: rgba(236, 72, 153, 0.4);
    transform: translateY(-2px);
}

.target-team-blorps .mini-blorp:nth-child(1) { transition-delay: 0s; }
.target-team-blorps .mini-blorp:nth-child(2) { transition-delay: 0.05s; }
.target-team-blorps .mini-blorp:nth-child(3) { transition-delay: 0.1s; }

/* Raid Section Headers */
.raid-section:last-child h3 {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #fff, var(--pink-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Raid Team Preview Hover */
.raid-team-preview .preview-blorp:hover {
    transform: scale(1.1) translateY(-4px);
    border-color: var(--pink-main);
}

/* Loading/Empty State Text */
.raid-loading span {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 1px;
}

/* Battle Card Hover Border */
.battle-card:hover::before {
    opacity: 0.8;
}

/* Breathing animation for active states */
.active-mine-card,
.active-raid-card {
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(74, 222, 128, 0.15);
    }
    50% {
        box-shadow: 0 4px 30px rgba(74, 222, 128, 0.25);
    }
}

/* Raid empty state text */
.raid-empty span {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 1px;
}

/* Raid team selector header */
.raid-team-selector h3 {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #fff, var(--pink-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Reinforce empty state */
.reinforce-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.reinforce-empty-state svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-muted);
    margin-bottom: 16px;
}

.reinforce-empty-state .empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.reinforce-empty-state .empty-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Reinforce loading state */
.reinforce-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 48px 24px;
    text-align: center;
}

.loading-pulse {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink-main), var(--purple-glow));
    animation: loadingPulse 1.2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Pulse animations for battle states */
@keyframes pulseGreen {
    0%, 100% { box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
    50% { box-shadow: 0 0 14px rgba(74, 222, 128, 0.9); }
}

@keyframes pulsePink {
    0%, 100% { box-shadow: 0 0 8px rgba(236, 72, 153, 0.6); }
    50% { box-shadow: 0 0 14px rgba(236, 72, 153, 0.9); }
}

/* Banner pulse animation */
@keyframes banner-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; box-shadow: 0 0 12px rgba(236, 72, 153, 0.6); }
}

/* Count glow animation */
@keyframes count-glow {
    0%, 100% { box-shadow: 0 0 14px rgba(255, 138, 108, 0.4); }
    50% { box-shadow: 0 0 22px rgba(255, 138, 108, 0.6); }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    #raidingTab > h2 {
        font-size: 32px;
        letter-spacing: 2px;
    }

    .history-card {
        flex: 0 0 300px;
    }

    /* Team selector above the target list on phones - picking a team is
       step one of a raid, and below 100+ targets it needed a full-page
       scroll to reach. */
    .raid-layout {
        display: flex;
        flex-direction: column;
    }

    .raid-layout .raid-section:last-child {
        order: -1;
    }
}

/* ============================================
   Raid Target Browser (toolbar, badges, paging)
   ============================================ */

.raid-targets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.raid-targets-header .target-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
}

.raid-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s ease;
}

.raid-refresh-btn:hover {
    color: var(--green-main);
    border-color: var(--green-main);
    background: rgba(45, 212, 233, 0.08);
}

.raid-refresh-btn:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

.raid-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.raid-refresh-btn svg {
    width: 16px;
    height: 16px;
}

.raid-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0 16px;
}

.raid-toolbar-select,
.raid-toolbar-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-main, #fff);
    font-family: inherit;
    font-size: 13px;
    padding: 8px 12px;
    transition: border-color 0.2s ease;
}

.raid-toolbar-select:focus,
.raid-toolbar-input:focus {
    outline: none;
    border-color: var(--green-main);
}

.raid-toolbar-input {
    width: 92px;
}

.raid-toolbar-input.raid-toolbar-search {
    flex: 1;
    min-width: 140px;
}

.raid-beatable-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.raid-beatable-toggle input {
    accent-color: var(--green-main);
    cursor: pointer;
}

/* Matchup badge on target cards */
.win-chance {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.win-chance.favored {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.35);
}

.win-chance.even {
    color: #facc15;
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.win-chance.risky {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.win-chance.neutral {
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
}

/* Target list pagination (reuses .pagination-btn from my-blorps.css) */
.raid-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

/* Skeleton target cards while the list loads */
.raid-target-card.skeleton-card {
    pointer-events: none;
}

.skeleton-card .skeleton-portraits {
    width: 120px;
    height: 48px;
    flex-shrink: 0;
}

.skeleton-card .skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-card .skeleton-line {
    height: 12px;
    width: 70%;
}

.skeleton-card .skeleton-line.short {
    width: 45%;
}

.skeleton-card .skeleton-pill {
    width: 84px;
    height: 36px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* Draw the eye to the team panel when Attack is pressed with no team */
.raid-team-selector.attention-pulse {
    animation: raidPanelPulse 1.2s ease-out 2;
    border-radius: 18px;
}

@keyframes raidPanelPulse {
    0%   { box-shadow: 0 0 0 0 rgba(45, 212, 233, 0.55); }
    70%  { box-shadow: 0 0 0 14px rgba(45, 212, 233, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 212, 233, 0); }
}

@media (max-width: 768px) {
    .raid-toolbar {
        gap: 8px;
    }

    .raid-toolbar-select {
        flex: 1 1 100%;
    }

    .raid-toolbar-input.raid-toolbar-search {
        min-width: 0;
    }
}

/* Touch devices have no hover: keep the clear-X visible (dimmed) so a
   selected salmon can actually be removed from a slot on mobile. */
@media (hover: none) {
    .team-slot .selected-blorp .clear-slot-btn {
        opacity: 0.85 !important;
    }

    .raid-team-slot.filled .clear-slot {
        opacity: 0.85;
    }
}

/* Bear Tax preview lines (only rendered when the tax is > 0) */
.prize-bear-tax,
.loot-bear-tax {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #ffb37a;
    letter-spacing: 0.03em;
    margin-top: 2px;
}

/* ============================================
   Raid outcome clarity (Wave-1: raiding #3, #6)
   ============================================ */

/* Target card: rarity tier badge (populated after the initial paint by
   paintTargetRarityBadges). Hidden until it has content so there's no layout
   shift and no empty pill on targets we couldn't score. */
.target-info-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.target-rarity {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
    color: var(--rarity-color, var(--text-dim));
    border: 1px solid var(--rarity-color, var(--border-subtle));
    background: color-mix(in srgb, var(--rarity-color, #7f8a96) 14%, transparent);
}

.target-rarity:empty {
    display: none;
}

/* Extra stat chips (TP / SPD) alongside the reused .enhanced-stat BP block.
   Compact so all three fit on a target card row. */
.target-stats {
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.raid-stat-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 12px;
    cursor: help;
}

.raid-stat-chip .stat-value {
    font-weight: 700;
    color: var(--text-main);
}

.raid-stat-chip .stat-label {
    color: var(--text-dim);
    font-size: 11px;
}

/* statTooltipAttrs adds title/aria-label - hint that these labels are hoverable. */
.enhanced-stat[data-stat] {
    cursor: help;
}

/* Matchup row: win-chance badge + the "?" explainer for the reinforce caveat. */
.matchup-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.win-chance-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    cursor: help;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.win-chance-help:hover,
.win-chance-help:focus-visible {
    color: var(--text-main);
    border-color: var(--text-dim);
    outline: none;
}

/* Reinforcement selector: value explainer line at the top of the terminal. */
/* ============================================
   Battle results: SVG icon + outcome resolution
   ============================================ */

/* The results icon is now an inline SVG (trophy / broken-heart) rather than an
   emoji. Size it to match the old 48px emoji and tint by outcome. */
.results-icon svg {
    width: 52px;
    height: 52px;
    display: inline-block;
}

.results-banner.victory .results-icon {
    color: var(--green-main);
    filter: drop-shadow(0 0 16px rgba(0, 255, 135, 0.45));
}

.results-banner.defeat .results-icon {
    color: #ff6b6b;
    filter: drop-shadow(0 0 16px rgba(255, 100, 100, 0.4));
}

/* Resolution explainer block: how the fight actually resolved, so a random
   loss reads as tense-and-fair rather than buggy. */
.results-resolution {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 12px 16px;
    margin: 0 0 4px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
}

.results-resolution .resolution-headline {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.results-resolution.power .resolution-headline { color: var(--green-main); }
.results-resolution.upset .resolution-headline { color: #ffa157; }
.results-resolution.even  .resolution-headline { color: #facc15; }

.results-resolution.upset {
    border-color: rgba(255, 161, 87, 0.4);
    background: rgba(255, 161, 87, 0.08);
}

.results-resolution .resolution-detail {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-main);
}

.results-resolution .resolution-bp {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

/* The win-odds "?" uses the shared [data-tooltip] hover bubble, but its help
   text is a sentence - let it wrap in a readable column instead of the
   default nowrap one-liner, and keep it anchored inside the card. */
.win-chance-help[data-tooltip]::after {
    white-space: normal;
    width: 240px;
    text-align: left;
    line-height: 1.5;
    left: 0;
    transform: translateY(10px);
}

.win-chance-help[data-tooltip]:hover::after {
    transform: translateY(0);
}

/* The hidden attribute must win over the explicit display rules above -
   the win-odds badge + its "?" only appear once a team is selected. */
.win-chance[hidden],
.win-chance-help[hidden] {
    display: none !important;
}

/* Reinforce picker: salmon on an on-chain battle-window lock render greyed
   and non-selectable with a cooldown note - selecting one used to submit a
   doomed tx reverting with BlorpLocked (2026-07-08). */
.reinforce-row.locked {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.row-lock-note {
    display: block;
    font-size: 11px;
    color: var(--yellow-main, #ffc44c);
    margin-top: 2px;
}

/* Battle modifiers breakdown: final effective BPs + why they differ from
   the raw numbers (faction matchup, speed first strike) + exact odds. */
.battle-modifiers-row {
    margin: 10px 0 4px;
    text-align: center;
}

.battle-mod-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}

.battle-mod-chip {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(255, 196, 76, 0.1);
    border: 1px solid rgba(255, 196, 76, 0.35);
    color: var(--yellow-main, #ffc44c);
}

.battle-mod-chip.neutral {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
    color: var(--text-dim);
}

.battle-mod-final {
    font-size: 13px;
    color: var(--text-muted);
}

.battle-mod-final .def { color: #5e8fff; }
.battle-mod-final .att { color: var(--pink-main, #ff6a8a); }
.battle-mod-odds { color: var(--text-dim); }

.history-card.clickable { cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease; }
.history-card.clickable:hover { transform: translateY(-2px); border-color: rgba(94, 143, 255, 0.45); }
