/* ============================================
   BLORPS App - Modal Styles
   All Modal Components
   ============================================ */

/* ============================================
   Base Modal Styles
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Blorp selector modal should appear above other modals */
#blorpModal {
    z-index: 1100;
}

.modal.open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

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

.modal-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.modal-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-search {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

.modal-search::placeholder {
    color: var(--text-muted);
}

.modal-filter {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.modal-filter:hover,
.modal-filter:focus {
    border-color: var(--green-main);
}

.modal-filter option {
    background: var(--bg-dark);
    color: var(--text-main);
}

/* ============================================
   Raiding Layout
   ============================================ */
.raid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-top: 8px;
}

.raid-info-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(255, 107, 205, 0.15), rgba(255, 107, 205, 0.05));
    border: 1px solid rgba(255, 107, 205, 0.3);
    border-radius: 14px;
    font-size: 14px;
    color: var(--pink-light);
    box-shadow: 0 0 30px rgba(255, 107, 205, 0.1);
    position: relative;
    overflow: hidden;
}

.raid-info-banner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--pink-main), var(--pink-glow));
    animation: banner-pulse 2s ease-in-out infinite;
}

.raid-info-banner svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.raid-section h3 {
    font-family: var(--font-display);
    font-size: 18px;
    margin-bottom: 16px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.raid-targets {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.raid-target-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.raid-target-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 107, 205, 0.05), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.raid-target-card:hover {
    border-color: var(--pink-main);
    background: rgba(255, 107, 205, 0.08);
    transform: translateX(4px);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 107, 205, 0.15);
}

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

.target-team {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.target-team-blorps {
    display: flex;
    gap: 4px;
    align-items: center;
}

.target-team-blorps .mini-blorp {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: -8px;
    transition: all 0.3s ease;
}

.target-team-blorps .mini-blorp:first-child {
    margin-left: 0;
}

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

.target-info {
    flex: 1;
}

.target-player {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.target-mine {
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.target-loot {
    text-align: right;
    min-width: 100px;
}

.loot-amount {
    display: block;
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--green-main);
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

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

.attack-btn {
    padding: 10px 20px;
    background: var(--pink-main);
    border: none;
    border-radius: 10px;
    color: var(--purple-dark);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.attack-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(236, 72, 153, 0.5);
}

/* Raid loading/empty/error states */
.raid-loading,
.raid-empty,
.raid-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-dim);
    gap: 12px;
    background: radial-gradient(ellipse at center, rgba(236, 72, 153, 0.05) 0%, transparent 70%);
    border-radius: 16px;
    border: 1px dashed rgba(236, 72, 153, 0.15);
}

.raid-loading span,
.raid-empty span,
.raid-error span {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-secondary);
}

.raid-empty p {
    font-size: 13px;
    max-width: 280px;
    line-height: 1.5;
}

.raid-loading {
    animation: pulse 2s ease-in-out infinite;
}

.raid-error button {
    margin-top: 8px;
    padding: 8px 16px;
    background: var(--pink-main);
    border: none;
    border-radius: 8px;
    color: var(--purple-dark);
    font-weight: 600;
    cursor: pointer;
}

/* Team placeholder in raid cards */
.team-placeholder {
    width: 80px;
    height: 50px;
    background: var(--bg-hover);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-placeholder .team-id {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
}

.raid-team-selector {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* Raid Team Creation */
.raid-create-team {
    margin-bottom: 16px;
}

.create-team-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.create-team-header .optional-label {
    color: var(--text-dim);
    font-size: 11px;
}

.raid-team-slots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.raid-team-slot {
    width: 70px;
    height: 85px;
    border-radius: 12px;
    background: var(--bg-hover);
    border: 2px dashed var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 6px;
    position: relative;
}

.raid-team-slot:hover {
    border-color: var(--pink-main);
    background: rgba(255, 0, 128, 0.05);
    transform: translateY(-4px);
}

.raid-team-slot svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-dim);
    transition: stroke 0.2s ease;
}

.raid-team-slot:hover svg {
    stroke: var(--pink-main);
}

.raid-team-slot span {
    font-size: 11px;
    color: var(--text-dim);
}

.raid-team-slot:hover span {
    color: var(--pink-main);
}

.raid-team-slot.filled {
    border-style: solid;
    border-color: var(--pink-main);
    background: rgba(255, 0, 128, 0.08);
    padding: 4px;
    position: relative;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.raid-team-slot.filled .slot-blorp-svg {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.raid-team-slot.filled .slot-blorp-svg svg {
    width: 100%;
    height: 100%;
    stroke: none;
}

.raid-team-slot.filled .clear-slot {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s ease;
}

.raid-team-slot.filled .clear-slot:hover {
    background: #ff4466;
    border-color: #ff4466;
}

.raid-team-slot.filled .clear-slot svg {
    width: 10px;
    height: 10px;
    stroke: var(--text-dim);
}

.raid-team-slot.filled .clear-slot:hover svg {
    stroke: white;
}

/* Raid create footer with BP and button */
.raid-create-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(236, 72, 153, 0.1);
}

.raid-create-bp-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(236, 72, 153, 0.08);
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(236, 72, 153, 0.15);
}

.raid-create-bp-container .bp-label {
    color: var(--text-dim);
    font-weight: 500;
}

.raid-create-bp-container .bp-value {
    color: #f472b6;
    font-weight: 700;
    font-size: 16px;
    text-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
    font-variant-numeric: tabular-nums;
}

/* Tactical Deploy Button */
.raid-create-btn {
    position: relative;
    background: linear-gradient(135deg, #1a0a12 0%, #2d1020 50%, #1a0a12 100%);
    color: white;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    overflow: hidden;
    clip-path: polygon(
        0 0,
        calc(100% - 10px) 0,
        100% 10px,
        100% 100%,
        10px 100%,
        0 calc(100% - 10px)
    );
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 0 20px rgba(236, 72, 153, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.raid-create-btn::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: linear-gradient(135deg, #2d1020 0%, #1a0a12 100%);
    clip-path: polygon(
        0 0,
        calc(100% - 9px) 0,
        100% 9px,
        100% 100%,
        9px 100%,
        0 calc(100% - 9px)
    );
    z-index: 0;
}

.raid-create-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(236, 72, 153, 0.4) 0%,
        transparent 50%,
        rgba(236, 72, 153, 0.2) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Animated glow pulse behind button */
.raid-create-btn .btn-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        90deg,
        #ec4899,
        #f472b6,
        #ec4899,
        #db2777
    );
    background-size: 300% 100%;
    animation: glow-pulse 2s ease-in-out infinite;
    clip-path: polygon(
        0 0,
        calc(100% - 10px) 0,
        100% 10px,
        100% 100%,
        10px 100%,
        0 calc(100% - 10px)
    );
    z-index: -1;
    filter: blur(1px);
}

@keyframes glow-pulse {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.6;
    }
    50% {
        background-position: 100% 50%;
        opacity: 1;
    }
}

/* Button content container */
.raid-create-btn .btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
}

/* Crossed swords icon */
.raid-create-btn .btn-icon {
    width: 16px;
    height: 16px;
    stroke: #f472b6;
    filter: drop-shadow(0 0 3px rgba(236, 72, 153, 0.6));
    transition: all 0.3s ease;
}

/* Button text */
.raid-create-btn .btn-text {
    font-family: inherit;
    text-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

/* Shimmer sweep effect */
.raid-create-btn .btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    z-index: 3;
    transition: left 0.5s ease;
}

/* Hover state */
.raid-create-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 30px rgba(236, 72, 153, 0.5),
        0 0 60px rgba(236, 72, 153, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.raid-create-btn:hover::after {
    opacity: 1;
}

.raid-create-btn:hover .btn-shimmer {
    left: 100%;
}

.raid-create-btn:hover .btn-icon {
    stroke: white;
    transform: scale(1.1) rotate(-5deg);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.raid-create-btn:hover .btn-glow {
    animation: glow-pulse 1s ease-in-out infinite;
    filter: blur(2px);
}

/* Active/pressed state */
.raid-create-btn:active {
    transform: translateY(0);
    box-shadow:
        0 0 15px rgba(236, 72, 153, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.raid-create-btn:active .btn-glow {
    opacity: 0.8;
}

.max-teams-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.max-teams-message .max-teams-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-dim);
}

.raid-team-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-dim);
    font-size: 12px;
    position: relative;
}

.raid-team-divider::before,
.raid-team-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.raid-team-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.raid-team-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.raid-team-row:hover {
    background: rgba(0, 255, 135, 0.08);
    border-color: rgba(0, 255, 135, 0.3);
    transform: translateX(4px);
}

.raid-team-row.selected {
    background: rgba(0, 255, 135, 0.12);
    border-color: var(--green-main);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.15);
}

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

.raid-team-row .mini-blorp {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-main);
    border: 1px solid var(--border-subtle);
}

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

.raid-team-row .team-row-info {
    flex: 1;
    min-width: 0;
}

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

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

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

.raid-team-row .team-row-check svg {
    width: 14px;
    height: 14px;
    stroke: var(--green-main);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.raid-team-row.selected .team-row-check {
    background: var(--green-main);
    border-color: var(--green-main);
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
}

.raid-team-row.selected .team-row-check svg {
    stroke: var(--bg-main);
    opacity: 1;
}

.raid-team-preview {
    padding: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(168, 85, 247, 0.04));
    border: 1px solid rgba(236, 72, 153, 0.2);
    border-radius: 14px;
}

.raid-team-preview .preview-blorps {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.raid-team-preview .preview-blorp {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-hover);
    border: 2px solid var(--border-subtle);
    transition: all 0.3s ease;
}

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

.raid-team-preview .preview-stats {
    text-align: center;
}

.raid-team-preview .preview-stats span:first-child {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--text-dim);
    display: block;
    margin-bottom: 4px;
    text-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
}

.power-value {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--pink-main);
}

.raid-no-teams {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-dim);
    background: radial-gradient(ellipse at center, rgba(236, 72, 153, 0.05) 0%, transparent 70%);
    border-radius: 12px;
}

.raid-no-teams svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.raid-no-teams p {
    font-family: var(--font-display);
    font-size: 14px;
    margin: 0;
    letter-spacing: 0.5px;
}

/* ============================================
   Leaderboard
   ============================================ */
.leaderboard-tabs {
    display: flex;
    gap: 8px;
}

.lb-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.lb-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lb-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--border-active);
}

.lb-tab:hover::before {
    opacity: 1;
}

.lb-tab.active {
    background: linear-gradient(135deg, var(--green-main), var(--green-dark));
    border-color: var(--green-main);
    color: var(--purple-dark);
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.4), var(--glow-green);
    transform: translateY(-2px);
}

.leaderboard-table {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lb-header,
.lb-row {
    display: grid;
    grid-template-columns: 80px 1fr 200px;
    padding: 18px 28px;
    align-items: center;
    gap: 12px;
}

.lb-stat {
    text-align: right;
}

.lb-header {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.15));
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lb-row {
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-row:hover {
    background: rgba(74, 222, 128, 0.05);
    transform: translateX(4px);
}

.lb-row:nth-child(2) {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent 50%);
}

.lb-row:nth-child(3) {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.08), transparent 50%);
}

.lb-row:nth-child(4) {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.08), transparent 50%);
}

.lb-rank {
    font-family: var(--font-display);
    font-size: 20px;
}

.lb-row.gold .lb-rank { color: var(--yellow-main); }
.lb-row.silver .lb-rank { color: #c0c0c0; }
.lb-row.bronze .lb-rank { color: #cd7f32; }

.lb-player {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.player-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--green-main), var(--blue-main));
    border-radius: 50%;
}

.lb-stat {
    font-weight: 700;
    color: var(--green-main);
}

.lb-blorps {
    color: var(--text-muted);
}

.lb-row.you {
    background: rgba(45, 212, 233, 0.12);
    border: 1px solid var(--green-main);
}

.lb-you-tag {
    color: var(--green-light);
    font-weight: 700;
    margin-left: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Range toggle (Season 1 / All-time) */
.leaderboard-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.lb-range-toggle {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 3px;
}

.lb-range-btn {
    padding: 6px 14px;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.lb-range-btn:hover {
    color: var(--text-main);
}

.lb-range-btn.active {
    background: rgba(45, 212, 233, 0.18);
    color: var(--green-light);
    box-shadow: inset 0 0 0 1px rgba(127, 234, 245, 0.45);
}

.lb-empty {
    padding: 32px 28px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
}

/* ============================================
   History Section - Premium Trading Ledger
   ============================================ */

/* Summary Stats */
.history-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.summary-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.7));
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.summary-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.summary-stat.sold::before {
    background: linear-gradient(180deg, var(--green-main), var(--green-light));
}

.summary-stat.bought::before {
    background: linear-gradient(180deg, var(--pink-main), #ffb3e6);
}

.summary-stat.net::before {
    background: linear-gradient(180deg, var(--blue-main), var(--blue-light));
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-stat.sold .stat-icon {
    background: rgba(74, 222, 128, 0.15);
    color: var(--green-main);
}

.summary-stat.bought .stat-icon {
    background: rgba(255, 107, 205, 0.15);
    color: var(--pink-main);
}

.summary-stat.net .stat-icon {
    background: rgba(107, 207, 255, 0.15);
    color: var(--blue-main);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.stat-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

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

.summary-stat.bought .stat-value {
    color: var(--pink-main);
}

.summary-stat.net .stat-value {
    color: var(--blue-main);
}

.summary-stat.net .stat-value.negative {
    color: var(--pink-main);
}

.stat-value .token {
    font-size: 12px;
    opacity: 0.7;
}

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

/* History List */
.history-list {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(22, 33, 62, 0.6));
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
}

.history-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.15);
}

.history-list-header h4 {
    font-family: var(--font-display);
    font-size: 16px;
    margin: 0;
}

.history-filters {
    display: flex;
    gap: 8px;
}

.history-filter-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.history-filter-btn.active {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
    color: var(--green-main);
}

/* Transaction Cards */
.transaction-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    transition: all 0.3s ease;
}

.transaction-card:last-child {
    border-bottom: none;
}

.transaction-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

.transaction-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    border-radius: 0 2px 2px 0;
    transition: height 0.3s ease;
}

.transaction-card.sale .transaction-indicator {
    background: linear-gradient(180deg, var(--green-main), var(--green-light));
}

.transaction-card.purchase .transaction-indicator {
    background: linear-gradient(180deg, var(--pink-main), #ffb3e6);
}

.transaction-card:hover .transaction-indicator {
    height: 60%;
}

.transaction-blorp {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
}

.transaction-blorp svg {
    width: 100%;
    height: 100%;
}

.transaction-details {
    flex: 1;
    min-width: 0;
}

.transaction-main {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.transaction-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
}

.transaction-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.transaction-type svg {
    width: 10px;
    height: 10px;
}

.transaction-type.sale {
    background: rgba(74, 222, 128, 0.15);
    color: var(--green-main);
}

.transaction-type.purchase {
    background: rgba(255, 107, 205, 0.15);
    color: var(--pink-main);
}

.transaction-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.transaction-date {
    font-size: 12px;
    color: var(--text-dim);
}

.transaction-id {
    font-size: 11px;
    color: var(--text-dim);
    opacity: 0.6;
    font-family: monospace;
}

.transaction-amount {
    text-align: right;
    min-width: 120px;
}

.amount-value {
    display: block;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
}

.transaction-amount.sale .amount-value {
    color: var(--green-main);
}

.transaction-amount.purchase .amount-value {
    color: var(--pink-main);
}

.amount-token {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.transaction-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 100px;
    justify-content: center;
}

.transaction-status svg {
    width: 14px;
    height: 14px;
}

.transaction-status.complete {
    background: rgba(74, 222, 128, 0.1);
    color: var(--green-main);
}

.transaction-status.pending {
    background: rgba(255, 217, 61, 0.1);
    color: var(--yellow-main);
}

/* Legacy support */
.history-table {
    display: none;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.complete,
.status-badge.deposited,
.status-badge.idle {
    background: rgba(74, 222, 128, 0.1);
    color: var(--green-main);
}

.status-badge.mining {
    background: rgba(251, 191, 36, 0.15);
    color: var(--yellow-main, #fbbf24);
}

.status-badge.in-team {
    background: rgba(96, 165, 250, 0.15);
    color: var(--blue-light, #60a5fa);
}

.status-badge.raiding {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red-main, #ef4444);
}

/* ============================================
   Deposit/Withdraw Modal Styles
   ============================================ */
.modal-content.large {
    max-width: 900px;
}

.deposit-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(107, 207, 255, 0.1);
    border: 1px solid rgba(107, 207, 255, 0.3);
    border-radius: 12px;
    font-size: 14px;
    color: var(--blue-light);
    margin-bottom: 24px;
}

.deposit-info-banner.warning {
    background: rgba(255, 217, 61, 0.1);
    border-color: rgba(255, 217, 61, 0.3);
    color: #fde68a;
}

.deposit-info-banner svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.deposit-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
}

.wallet-blorps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.wallet-blorp-card {
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.wallet-blorp-card.selectable {
    cursor: pointer;
}

.wallet-blorp-card.selectable:hover {
    border-color: var(--green-main);
    background: rgba(74, 222, 128, 0.05);
}

.wallet-blorp-card.selected {
    border-color: var(--green-main);
    background: rgba(74, 222, 128, 0.1);
}

.wallet-blorp-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.select-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-subtle);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.wallet-blorp-card.selected .select-checkbox {
    background: var(--green-main);
    border-color: var(--green-main);
}

.wallet-blorp-card.selected .select-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--purple-dark);
    font-size: 12px;
    font-weight: 700;
}

/* Modal Blorps Grid */
.modal-blorps,
.wallet-blorps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding: 4px;
}

/* Modal & Wallet grid mini card adjustments */
.modal-blorps .blorp-card-wrapper.mini,
.wallet-blorps-grid .blorp-card-wrapper.mini {
    width: 100%;
    min-width: unset;
}

.modal-blorps .blorp-card-wrapper.mini.modal-selectable,
.wallet-blorps-grid .blorp-card-wrapper.mini.wallet-selectable {
    cursor: pointer;
}

/* Selected state for mini cards (deposit/withdraw modals) */
.modal-blorps .blorp-card-wrapper.mini.selected .blorp-card-border,
.wallet-blorps-grid .blorp-card-wrapper.mini.selected .blorp-card-border {
    opacity: 1;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

.modal-blorps .blorp-card-wrapper.mini.selected::after,
.wallet-blorps-grid .blorp-card-wrapper.mini.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--green-main);
    color: #0a1a10;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.4);
}

/* Disabled state (busy blorp) */
.wallet-blorps-grid .blorp-card-wrapper.mini.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.blorp-preview svg {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
}

.blorp-wallet-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.blorp-wallet-info .blorp-name {
    font-weight: 700;
    font-size: 13px;
}

.blorp-stats-mini {
    font-size: 11px;
    color: var(--text-dim);
}

.blorp-status {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.blorp-status.available {
    background: rgba(74, 222, 128, 0.15);
    color: var(--green-main);
}

.blorp-status.busy {
    background: rgba(255, 217, 61, 0.15);
    color: var(--yellow-main);
}

.deposit-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.selected-count {
    color: var(--text-muted);
    font-size: 14px;
}

.deposit-btn,
.withdraw-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deposit-btn {
    background: var(--green-main);
    color: var(--purple-dark);
}

.withdraw-btn {
    background: var(--blue-main);
    color: var(--purple-dark);
}

.deposit-btn:disabled,
.withdraw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.deposit-btn:hover:not(:disabled),
.withdraw-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.3);
}

/* ============================================
   Form Styles (Modals)
   ============================================ */
.listing-form,
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.blorp-select-area {
    padding: 32px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blorp-select-area:hover {
    border-color: var(--green-main);
    background: rgba(74, 222, 128, 0.05);
}

.empty-select {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
}

.empty-select svg {
    width: 32px;
    height: 32px;
}

/* Selected Blorp Display in Lending Modal */
.blorp-select-area.has-selection {
    padding: 16px;
    border-style: solid;
    border-color: var(--green-main);
    background: rgba(74, 222, 128, 0.08);
}

.selected-blorp-display {
    display: flex;
    align-items: center;
    gap: 16px;
}

.selected-blorp-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.selected-blorp-image svg {
    width: 100%;
    height: 100%;
}

.selected-blorp-info {
    flex: 1;
}

.selected-blorp-info h4 {
    font-family: var(--font-display);
    font-size: 16px;
    margin-bottom: 4px;
}

.selected-blorp-rarity {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selected-blorp-stats {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.change-blorp-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.change-blorp-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-secondary);
    color: var(--text-main);
}

.change-blorp-btn svg {
    width: 16px;
    height: 16px;
}

.price-input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    overflow: hidden;
}

.price-input-group input {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 16px;
    outline: none;
}

.price-input-group .input-suffix {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 14px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 6px;
}

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

.create-listing-submit,
.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--green-main);
    border: none;
    border-radius: 12px;
    color: var(--purple-dark);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-listing-submit:disabled,
.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.lending-info {
    padding: 16px;
    background: rgba(107, 207, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
}

.lending-info p {
    color: var(--blue-light);
    font-size: 14px;
}

/* ============================================
   Edit Price Modal Styles
   ============================================ */
.modal-content.compact {
    max-width: 480px;
}

.edit-price-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 222, 107, 0.08), rgba(255, 222, 107, 0.02));
    border: 1px solid rgba(255, 222, 107, 0.15);
    border-radius: 16px;
    margin-bottom: 24px;
}

.preview-blorp {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    position: relative;
}

.preview-blorp svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.preview-blorp::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: radial-gradient(circle, rgba(255, 222, 107, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.preview-info h4 {
    font-family: var(--font-display);
    font-size: 18px;
    margin: 0 0 6px 0;
}

.preview-info .listing-rarity-tag {
    margin: 0;
}

.edit-price-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.current-price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

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

.current-value {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--text-secondary);
}

.edit-price-form .form-group {
    margin-bottom: 0;
}

.edit-price-form .listing-summary {
    margin-bottom: 0;
}

.edit-price-actions {
    display: flex;
    gap: 12px;
}

.edit-price-actions .cancel-btn {
    flex: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-price-actions .cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-dim);
}

.edit-price-actions .confirm-btn {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--green-main), #3bc974);
    border: none;
    border-radius: 12px;
    color: var(--purple-dark);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.edit-price-actions .confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.edit-price-actions .confirm-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.35);
}

.edit-price-actions .confirm-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   Reinforcement Modal Styles
   ============================================ */
.reinforce-context {
    margin-bottom: 24px;
}

.battle-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    margin-bottom: 16px;
}

.team-side {
    text-align: center;
    padding: 16px 32px;
    border-radius: 12px;
}

.team-side.defense {
    background: rgba(107, 207, 255, 0.15);
    border: 1px solid rgba(107, 207, 255, 0.3);
}

.team-side.attack {
    background: rgba(255, 107, 205, 0.15);
    border: 1px solid rgba(255, 107, 205, 0.3);
}

.side-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.team-side.defense .side-label {
    color: var(--blue-light);
}

.team-side.attack .side-label {
    color: var(--pink-light);
}

.team-power .power-value {
    display: block;
    font-family: var(--font-display);
    font-size: 36px;
}

.team-side.defense .power-value {
    color: var(--blue-main);
}

.team-side.attack .power-value {
    color: var(--pink-main);
}

.team-power .power-label {
    font-size: 11px;
    color: var(--text-dim);
}

.vs-badge {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--text-dim);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.reinforce-timer {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.reinforce-timer .timer-value {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--yellow-main);
    margin-left: 8px;
}

.reinforce-options h4 {
    font-size: 16px;
    margin-bottom: 16px;
}

.mercenary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mercenary-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mercenary-option:hover {
    border-color: var(--border-active);
}

.merc-blorp svg {
    width: 50px;
    height: 50px;
}

.merc-info {
    flex: 1;
}

.merc-info .merc-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.merc-info .merc-stats {
    font-size: 13px;
    color: var(--green-main);
}

.merc-price .price {
    font-weight: 700;
    color: var(--text-main);
}

/* ============================================
   Team Expansion Modal Styles
   ============================================ */
.expand-info {
    text-align: center;
    margin-bottom: 24px;
}

.current-slots {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 12px;
    margin-bottom: 16px;
}

.slots-label {
    font-size: 13px;
    color: var(--text-muted);
}

.slots-value {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--green-main);
}

.expand-info p {
    font-size: 14px;
    color: var(--text-muted);
}

.expand-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.expand-option {
    position: relative;
    padding: 24px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.expand-option:hover {
    border-color: var(--green-main);
    transform: translateY(-2px);
}

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

.expand-option.popular {
    border-color: var(--yellow-main);
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    background: var(--yellow-main);
    color: var(--purple-dark);
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    text-transform: uppercase;
}

.expand-amount {
    display: block;
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--text-main);
    margin-bottom: 8px;
}

.expand-cost {
    display: block;
    font-weight: 700;
    color: var(--green-main);
    margin-bottom: 4px;
}

.expand-savings {
    font-size: 12px;
    color: var(--yellow-main);
}

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

.expand-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.expand-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.3);
}

/* ============================================
   Blorp Detail Modal Styles - Two Column Layout
   ============================================ */
.blorp-detail-modal {
    max-width: 920px;
    width: 95%;
    max-height: 92vh;
}

.blorp-detail-modal .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.blorp-detail-body {
    padding: 16px !important;
}

/* Two Column Layout */
.detail-two-col {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: stretch;
}

@media (max-width: 800px) {
    .detail-two-col {
        grid-template-columns: 1fr;
    }
}

/* Left Column: Full Height Blorp Showcase */
.blorp-detail-showcase {
    position: relative;
    width: 100%;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 16px;
    background: linear-gradient(180deg, rgba(30, 32, 45, 0.9) 0%, rgba(20, 22, 35, 0.98) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.detail-showcase-glow {
    position: absolute;
    top: 40px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.7;
}

.blorp-detail-showcase.legendary .detail-showcase-glow {
    background: radial-gradient(circle, #ffd700 0%, transparent 70%);
}

.blorp-detail-showcase.epic .detail-showcase-glow {
    background: radial-gradient(circle, #ff6bcd 0%, transparent 70%);
}

.blorp-detail-showcase.rare .detail-showcase-glow {
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}

.blorp-detail-showcase.common .detail-showcase-glow {
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
}

.detail-blorp-image {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.detail-blorp-image svg {
    width: 220px;
    height: 220px;
    filter: drop-shadow(0 12px 32px rgba(0,0,0,0.5));
}

/* Identity Section inside Showcase */
.showcase-identity {
    position: relative;
    z-index: 3;
    text-align: center;
    margin-top: 12px;
    margin-bottom: auto;
}

.showcase-identity h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 10px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.showcase-rarity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.showcase-rarity-badge svg {
    width: 14px;
    height: 14px;
}

/* Rarity-specific badge styles */
.showcase-rarity-badge.legendary {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 183, 0, 0.1) 100%);
    color: #ffd700;
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.showcase-rarity-badge.legendary svg {
    fill: #ffd700;
}

.showcase-rarity-badge.epic {
    background: linear-gradient(135deg, rgba(255, 107, 205, 0.2) 0%, rgba(168, 85, 247, 0.1) 100%);
    color: #ff6bcd;
    border: 1.5px solid rgba(255, 107, 205, 0.4);
    box-shadow: 0 0 20px rgba(255, 107, 205, 0.2);
}

.showcase-rarity-badge.epic svg {
    fill: #ff6bcd;
}

.showcase-rarity-badge.rare {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: #3b82f6;
    border: 1.5px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.showcase-rarity-badge.rare svg {
    fill: #3b82f6;
}

.showcase-rarity-badge.common {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
}

.showcase-rarity-badge.common svg {
    fill: var(--text-dim);
}

/* Stats Overlay on Image - 2x2 Grid */
.showcase-stats-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    z-index: 3;
}

.overlay-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(10, 12, 20, 0.88);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.overlay-stat:hover {
    background: rgba(15, 17, 28, 0.92);
    border-color: rgba(255, 255, 255, 0.12);
}

.overlay-stat svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.overlay-stat.bp svg { color: #ff6b6b; }
.overlay-stat.tp svg { stroke: #4ecdc4; }
.overlay-stat.speed svg { stroke: #ffde6b; }
.overlay-stat.purity svg { stroke: #a855f7; }

/* Right Column */
.detail-right-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Header Row: Name + Tags */
.detail-header-row {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-identity h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 6px 0;
}

.identity-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-rarity-badge {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.detail-rarity-badge.legendary {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 183, 0, 0.15));
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.detail-rarity-badge.epic {
    background: linear-gradient(135deg, rgba(255, 107, 205, 0.25), rgba(168, 85, 247, 0.15));
    color: #ff6bcd;
    border: 1px solid rgba(255, 107, 205, 0.3);
}

.detail-rarity-badge.rare {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(6, 182, 212, 0.15));
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.detail-rarity-badge.common {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Species Badge */
.detail-species-badge {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.detail-species-badge.goober {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.detail-species-badge.glimmer {
    background: rgba(255, 107, 205, 0.15);
    color: #ff6bcd;
    border: 1px solid rgba(255, 107, 205, 0.3);
}

.detail-species-badge.chonk {
    background: rgba(107, 207, 255, 0.15);
    color: #6bcfff;
    border: 1px solid rgba(107, 207, 255, 0.3);
}

.detail-species-badge.shade {
    background: rgba(160, 123, 192, 0.2);
    color: #a07bc0;
    border: 1px solid rgba(160, 123, 192, 0.3);
}

.detail-species-badge.cubeling {
    background: rgba(255, 222, 107, 0.15);
    color: #ffde6b;
    border: 1px solid rgba(255, 222, 107, 0.3);
}

.detail-species {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.detail-species .species-label {
    color: var(--text-dim);
}

.detail-species .species-value {
    color: var(--text-main);
    font-weight: 600;
}

/* Compact Stats Row */
.detail-stats-compact {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.compact-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 56px;
}

.compact-stat svg {
    width: 16px;
    height: 16px;
}

.compact-stat.bp svg { color: #ff6b6b; }
.compact-stat.tp svg { stroke: #4ecdc4; }
.compact-stat.speed svg { stroke: #ffde6b; }
.compact-stat.purity svg { stroke: #a855f7; }

.compact-stat-value {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.compact-stat-label {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* DNA Section */
.detail-dna-section h4 {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Legacy stat styles - keep for compatibility */
.detail-stat.purity .detail-stat-icon {
    background: rgba(168, 85, 247, 0.15);
}

.detail-stat.purity .detail-stat-icon svg {
    stroke: #a855f7;
}

.detail-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-stat-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

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

/* DNA Section Header */
.dna-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dna-section-header h4 {
    margin: 0;
}

.gene-key {
    display: flex;
    gap: 16px;
}

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

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

.key-dot.dominant {
    background: var(--text-main);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.key-dot.recessive {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* DNA Grid Layout - 3x2 */
.dna-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

@media (max-width: 600px) {
    .dna-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* DNA Card - Compact */
.dna-card {
    position: relative;
    border-radius: 10px;
    padding: 1px;
    animation: dnaCardEnter 0.3s ease-out backwards;
    animation-delay: var(--card-delay, 0s);
}

@keyframes dnaCardEnter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
}

.dna-card-glow {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.dna-card:hover .dna-card-glow {
    opacity: 1;
}

/* Species-specific glows */
.dna-card.goober .dna-card-glow {
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.3), inset 0 0 20px rgba(74, 222, 128, 0.1);
}

.dna-card.glimmer .dna-card-glow {
    box-shadow: 0 0 20px rgba(255, 107, 205, 0.3), inset 0 0 20px rgba(255, 107, 205, 0.1);
}

.dna-card.chonk .dna-card-glow {
    box-shadow: 0 0 20px rgba(107, 207, 255, 0.3), inset 0 0 20px rgba(107, 207, 255, 0.1);
}

.dna-card.shade .dna-card-glow {
    box-shadow: 0 0 20px rgba(160, 123, 192, 0.3), inset 0 0 20px rgba(160, 123, 192, 0.1);
}

.dna-card.cubeling .dna-card-glow {
    box-shadow: 0 0 20px rgba(255, 222, 107, 0.3), inset 0 0 20px rgba(255, 222, 107, 0.1);
}

.dna-card-inner {
    position: relative;
    background: linear-gradient(180deg, rgba(40, 44, 62, 0.98) 0%, rgba(28, 31, 45, 0.99) 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 10px;
    text-align: center;
    transition: all 0.2s ease;
}

.dna-card:hover .dna-card-inner {
    border-color: rgba(255, 255, 255, 0.15);
    background: linear-gradient(180deg, rgba(45, 49, 68, 0.98) 0%, rgba(32, 35, 50, 0.99) 100%);
}

/* Species-specific top border accent */
.dna-card.goober .dna-card-inner {
    border-top: 2px solid rgba(74, 222, 128, 0.5);
}

.dna-card.glimmer .dna-card-inner {
    border-top: 2px solid rgba(255, 107, 205, 0.5);
}

.dna-card.chonk .dna-card-inner {
    border-top: 2px solid rgba(107, 207, 255, 0.5);
}

.dna-card.shade .dna-card-inner {
    border-top: 2px solid rgba(160, 123, 192, 0.5);
}

.dna-card.cubeling .dna-card-inner {
    border-top: 2px solid rgba(255, 222, 107, 0.5);
}

/* Card Icon */
.dna-card-icon {
    font-size: 22px;
    margin-bottom: 6px;
    filter: grayscale(0.15);
    transition: all 0.2s ease;
    line-height: 1;
}

.dna-card:hover .dna-card-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

/* Part Label */
.dna-part-label {
    font-size: 9px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}

/* Dominant Trait */
.dna-dominant {
    margin-bottom: 10px;
}

.dominant-name {
    display: block;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.dominant-origin {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.dominant-origin.goober {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.dominant-origin.glimmer {
    background: rgba(255, 107, 205, 0.15);
    color: #ff6bcd;
}

.dominant-origin.chonk {
    background: rgba(107, 207, 255, 0.15);
    color: #6bcfff;
}

.dominant-origin.shade {
    background: rgba(160, 123, 192, 0.2);
    color: #a07bc0;
}

.dominant-origin.cubeling {
    background: rgba(255, 222, 107, 0.15);
    color: #ffde6b;
}

/* Recessive Genes - Vertical Stack */
.dna-recessive {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.recessive-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    transition: all 0.15s ease;
}

.recessive-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding-left: 4px;
    margin-left: -4px;
}

.r-tag {
    font-size: 9px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 20px;
}

.r-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Species-specific dots */
.r-dot.goober { background: #4ade80; box-shadow: 0 0 6px rgba(74, 222, 128, 0.5); }
.r-dot.glimmer { background: #ff6bcd; box-shadow: 0 0 6px rgba(255, 107, 205, 0.5); }
.r-dot.chonk { background: #6bcfff; box-shadow: 0 0 6px rgba(107, 207, 255, 0.5); }
.r-dot.shade { background: #a07bc0; box-shadow: 0 0 6px rgba(160, 123, 192, 0.5); }
.r-dot.cubeling { background: #ffde6b; box-shadow: 0 0 6px rgba(255, 222, 107, 0.5); }

.r-name {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pure Badge */
.pure-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 183, 0, 0.18));
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.35);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* Action Buttons - Compact */
.detail-actions {
    display: flex;
    gap: 10px;
    padding-top: 10px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-action-btn svg {
    width: 16px;
    height: 16px;
}

.detail-action-btn.breed {
    background: linear-gradient(135deg, #ff6bcd 0%, #a855f7 100%);
    color: white;
}

.detail-action-btn.breed:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 205, 0.3);
}

.detail-action-btn.breed svg {
    fill: white;
}

.detail-action-btn.list {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-action-btn.list:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Disabled state for action buttons */
.detail-action-btn.disabled,
.detail-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.detail-action-btn.breed.disabled,
.detail-action-btn.breed:disabled {
    background: linear-gradient(135deg, #666 0%, #555 100%);
}

.detail-action-btn.list.disabled,
.detail-action-btn.list:disabled {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Detail button wrapper with Soon badge */
.detail-btn-wrapper {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
}

.detail-btn-wrapper .detail-action-btn {
    flex: 1;
}

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

.coming-soon-badge.detail-soon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 217, 61, 0.2);
    color: #ffd93d;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ============================================
   Marketplace Detail Actions
   ============================================ */
.marketplace-actions {
    flex-direction: column;
    gap: 14px;
}

.marketplace-detail-price {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-price-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.detail-price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.detail-price-amount {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--green-main);
    text-shadow: 0 0 25px rgba(74, 222, 128, 0.3);
    letter-spacing: -0.5px;
}

.detail-price-token {
    font-size: 14px;
    font-weight: 700;
    color: var(--green-light);
    opacity: 0.8;
    text-transform: uppercase;
}

/* Rarity-specific price colors */
#blorpDetailModal.rarity-legendary .detail-price-amount {
    color: #ffd700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

#blorpDetailModal.rarity-legendary .detail-price-token {
    color: #ffb700;
}

#blorpDetailModal.rarity-epic .detail-price-amount {
    color: #ff6bcd;
    text-shadow: 0 0 30px rgba(255, 107, 205, 0.35);
}

#blorpDetailModal.rarity-epic .detail-price-token {
    color: #ff99dd;
}

#blorpDetailModal.rarity-rare .detail-price-amount {
    color: #6bcfff;
    text-shadow: 0 0 30px rgba(107, 207, 255, 0.35);
}

#blorpDetailModal.rarity-rare .detail-price-token {
    color: #99dfff;
}

/* Seller Info in Detail Modal */
.marketplace-detail-seller {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.detail-seller-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-seller-address {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 12px;
    border-radius: 6px;
}

/* Buy Now Button in Detail Modal */
.detail-action-btn.buy-now {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--green-main) 0%, #3bc974 100%);
    color: var(--purple-dark);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.3);
}

.detail-action-btn.buy-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(74, 222, 128, 0.45);
}

/* Rarity-specific buy button */
.detail-action-btn.buy-now.legendary {
    background: linear-gradient(135deg, #ffd700 0%, #f0c030 100%);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.35);
}

.detail-action-btn.buy-now.legendary:hover {
    box-shadow: 0 10px 35px rgba(255, 215, 0, 0.5);
}

.detail-action-btn.buy-now.epic {
    background: linear-gradient(135deg, #ff6bcd 0%, #e05ab8 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 205, 0.35);
}

.detail-action-btn.buy-now.epic:hover {
    box-shadow: 0 10px 35px rgba(255, 107, 205, 0.5);
}

.detail-action-btn.buy-now.rare {
    background: linear-gradient(135deg, #6bcfff 0%, #55b8e8 100%);
    color: #1a1a2e;
    box-shadow: 0 6px 20px rgba(107, 207, 255, 0.35);
}

.detail-action-btn.buy-now.rare:hover {
    box-shadow: 0 10px 35px rgba(107, 207, 255, 0.5);
}

.detail-action-btn.buy-now.common {
    background: linear-gradient(135deg, #8a8a9a 0%, #707080 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(100, 100, 120, 0.25);
}

.detail-action-btn.buy-now.common:hover {
    box-shadow: 0 10px 30px rgba(100, 100, 120, 0.4);
}

/* Rarity-specific modal accents */
#blorpDetailModal.rarity-legendary .detail-top-section {
    border-bottom-color: rgba(255, 215, 0, 0.2);
}

#blorpDetailModal.rarity-epic .detail-top-section {
    border-bottom-color: rgba(255, 107, 205, 0.2);
}

#blorpDetailModal.rarity-rare .detail-top-section {
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

/* ============================================
   Modal Search Focus & Additional Styles
   ============================================ */
.modal-search:focus {
    border-color: var(--border-active);
}

/* Mobile modal filters */
@media (max-width: 768px) {
    .modal-filters {
        gap: 8px;
    }

    .modal-search {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 13px;
    }

    .modal-filter {
        flex-shrink: 0;
        padding: 10px 12px;
        padding-right: 28px;
        font-size: 13px;
        min-width: auto;
    }
}

.wallet-blorps-grid .blorp-card-wrapper.mini.disabled .blorp-card-border {
    opacity: 0.2;
}

/* Busy overlay for in-use blorps */
.busy-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: inherit;
}

.busy-overlay span {
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Legacy modal-blorp-card (kept for backwards compatibility) */
.modal-blorp-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-blorp-card:hover {
    border-color: var(--green-main);
    transform: translateY(-2px);
}

.modal-blorp-card.selected {
    border-color: var(--green-main);
    background: rgba(74, 222, 128, 0.1);
}

/* ============================================
   Battle Modal Styles
   ============================================ */
.battle-modal {
    max-width: 700px;
    width: 95%;
}

.battle-modal .battle-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.battle-modal .battle-header h3 {
    flex: 1;
}

.battle-modal .battle-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 20px;
    color: #ff6b6b;
    font-family: var(--font-display);
    font-size: 14px;
}

.battle-modal .battle-timer svg {
    width: 16px;
    height: 16px;
}

.battle-modal .battle-body {
    padding: 24px;
}

.battle-modal .battle-arena {
    display: flex;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 24px;
    flex-direction: row;
    padding: 0;
}

.battle-side {
    flex: 1;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    position: relative;
}

.battle-side.defender {
    background: linear-gradient(135deg, rgba(30, 100, 200, 0.15), rgba(30, 100, 200, 0.05));
    border: 2px solid rgba(30, 100, 200, 0.3);
}

.battle-side.attacker {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.15), rgba(255, 100, 100, 0.05));
    border: 2px solid rgba(255, 100, 100, 0.3);
}

.battle-side .side-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.battle-side.defender .side-label {
    color: #4dabf7;
}

.battle-side.attacker .side-label {
    color: #ff6b6b;
}

.battle-side .label-icon {
    font-size: 18px;
}

.battle-modal .battle-team {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-direction: row;
    align-items: center;
    padding: 0;
}

.battle-modal .battle-team .battle-blorp {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-dark);
    border: 2px solid var(--border-subtle);
    margin-left: 0;
}

.battle-modal .battle-team .battle-blorp svg {
    width: 100%;
    height: 100%;
}

.battle-modal .battle-bp {
    margin-bottom: 16px;
}

.battle-modal .battle-bp .bp-label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.battle-modal .battle-bp .bp-value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
}

.battle-side.defender .bp-value {
    color: #4dabf7;
}

.battle-side.attacker .bp-value {
    color: #ff6b6b;
}

.battle-side.winning .bp-value {
    color: var(--green-main);
    text-shadow: 0 0 20px rgba(0, 255, 135, 0.5);
}

.reinforcement-slot {
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.reinforcement-slot .reinforce-label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.reinforce-blorp {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.reinforce-blorp.empty {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed var(--border-subtle);
    color: var(--text-dim);
    font-size: 18px;
}

.reinforce-blorp.filled {
    background: var(--bg-dark);
    border: 2px solid var(--green-main);
}

.reinforce-blorp.filled svg {
    width: 100%;
    height: 100%;
}

.battle-modal .battle-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 60px;
    padding: 0;
    margin: 0;
}

.battle-modal .battle-vs .vs-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 200, 0, 0.3), transparent 70%);
    border-radius: 50%;
    animation: vsGlowModal 2s ease-in-out infinite;
}

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

.battle-modal .battle-vs span {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: #ffc107;
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    z-index: 1;
}

.battle-turn-indicator {
    text-align: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-dim);
}

.battle-turn-indicator.your-turn {
    background: rgba(0, 255, 135, 0.1);
    border: 1px solid rgba(0, 255, 135, 0.3);
    color: var(--green-main);
}

.battle-turn-indicator.opponent-turn {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.battle-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.battle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

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

.battle-btn.reinforce-btn {
    background: var(--green-main);
    color: var(--bg-dark);
}

.battle-btn.reinforce-btn:hover:not(:disabled) {
    background: var(--green-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 255, 135, 0.3);
}

.battle-btn.settle-btn {
    background: #ffc107;
    color: var(--bg-dark);
}

.battle-btn.settle-btn:hover:not(:disabled) {
    background: #ffcd38;
    transform: translateY(-2px);
}

.battle-btn.wait-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border: 1px solid var(--border-subtle);
}

.battle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Battle Results Modal */
.battle-results-modal {
    max-width: 400px;
    width: 90%;
    text-align: center;
    overflow: hidden;
}

.results-banner {
    padding: 40px 24px;
    position: relative;
}

.results-banner.victory {
    background: linear-gradient(135deg, rgba(0, 255, 135, 0.2), rgba(0, 255, 135, 0.05));
}

.results-banner.defeat {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.2), rgba(255, 100, 100, 0.05));
}

.results-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    animation: resultsIconPulse 1.5s ease-in-out infinite;
}

@keyframes resultsIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.results-banner h2 {
    font-family: var(--font-display);
    font-size: 32px;
    margin: 0;
}

.results-banner.victory h2 {
    color: var(--green-main);
    text-shadow: 0 0 30px rgba(0, 255, 135, 0.5);
}

.results-banner.defeat h2 {
    color: #ff6b6b;
    text-shadow: 0 0 30px rgba(255, 100, 100, 0.5);
}

/* Modal open animation */
.modal.open {
    animation: modalOpen 0.4s var(--ease-out-expo);
}

@keyframes modalOpen {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal loading state */
.modal-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
}
