body { background-color: #0f172a; color: #e2e8f0; font-family: 'Noto Sans JP', sans-serif; overflow-x: hidden; }
.neon-border-tank { border: 1px solid #3b82f6; box-shadow: 0 0 10px #3b82f6; }
.neon-border-dps { border: 1px solid #ef4444; box-shadow: 0 0 10px #ef4444; }
.neon-border-sup { border: 1px solid #22c55e; box-shadow: 0 0 10px #22c55e; }

.hero-card { transition: all 0.2s; cursor: pointer; background: #1e293b; overflow: hidden; position: relative; border: 1px solid #334155; }
.hero-card:hover { transform: scale(1.05); background: #475569; z-index: 10; }
.hero-card.active { border: 2px solid #f59e0b; box-shadow: 0 0 15px #f59e0b; }
.hero-card * { pointer-events: none; }

.hero-label {
    position: absolute; bottom: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 60%, transparent 100%);
    padding: 14px 2px 4px 2px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.08em;
    text-align: center; color: #ffffff;
    white-space: nowrap; overflow: hidden;
}

.hero-img-container { width: 100%; aspect-ratio: 1/1; background: #0f172a; position: relative; padding: 6px; }
.hero-img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }

.badge { position: absolute; top: 0; right: 0; font-size: 7px; font-weight: 900; padding: 1px 4px; border-bottom-left-radius: 6px; text-transform: uppercase; z-index: 20; color: white; }
.badge-dive { background: #3b82f6; }
.badge-rush { background: #ef4444; }
.badge-poke { background: #f59e0b; color: #000; }
.badge-null { background: #f8fafc; color: #0f172a; }

.slot { background: rgba(30, 41, 59, 0.5); border: 2px dashed #475569; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.slot-filled { border-style: solid; background: #1e293b; }

.tab-btn { transition: all 0.3s; border-bottom: 4px solid transparent; opacity: 0.6; font-weight: 900; color: #94a3b8; }
.tab-btn.active-tank { color: #3b82f6 !important; border-color: #3b82f6 !important; background: rgba(59, 130, 246, 0.1); opacity: 1; }
.tab-btn.active-damage { color: #ef4444 !important; border-color: #ef4444 !important; background: rgba(239, 68, 68, 0.1); opacity: 1; }
.tab-btn.active-support { color: #22c55e !important; border-color: #22c55e !important; background: rgba(34, 197, 94, 0.1); opacity: 1; }

#db-modal { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(8px); align-items: center; justify-content: center; padding: 20px; }
#db-modal.open { display: flex; }
.modal-inner { background: #1e293b; border: 1px solid #334155; border-radius: 12px; width: 100%; max-width: 800px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-body { overflow-y: auto; flex-grow: 1; padding: 1rem; background: #0f172a; position: relative; }

.expand-btn { cursor: pointer; display: flex; align-items: center; justify-content: center; width: 100%; padding: 4px; color: #64748b; transition: color 0.2s; }
.expand-btn:hover { color: #f59e0b; }
.more-results { display: none; margin-top: 8px; }
.more-results.open { display: block; }
.arrow-icon { transition: transform 0.3s; }
.arrow-icon.open { transform: rotate(180deg); }

.rank-card { transition: all 0.3s ease; border-left-width: 4px; border-left-style: solid; border-left-color: transparent; background: rgba(30, 41, 59, 0.6); position: relative; min-height: 64px; cursor: pointer; }
.rank-card.role-tank { border-left-color: #3b82f6; background: rgba(59, 130, 246, 0.05); }
.rank-card.role-damage { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.05); }
.rank-card.role-support { border-left-color: #22c55e; background: rgba(34, 197, 94, 0.05); }
.rank-1 { background: rgba(255, 255, 255, 0.15) !important; box-shadow: inset 8px 0 20px -5px currentColor; }
.rank-2 { background: rgba(255, 255, 255, 0.10) !important; box-shadow: inset 4px 0 10px -5px currentColor; }
.rank-3 { background: rgba(255, 255, 255, 0.05) !important; }
.rank-number { width: 24px; font-size: 14px; font-weight: 900; font-style: italic; text-align: center; opacity: 0.8; flex-shrink: 0; }

.reorder-btn { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: #334155; color: #94a3b8; border-radius: 4px; font-size: 10px; transition: all 0.2s; }
.reorder-btn:hover { background: #475569; color: white; }

.labels-container { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-height: 28px; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.rank-card:hover .labels-container, .rank-card.is-expanded .labels-container { max-height: 500px; }
.label-item { display: inline-block; padding: 1px 6px; border-radius: 4px; border-width: 1px; font-size: 8px; font-weight: 700; white-space: nowrap; }

/* 編集用UI */
.stepper-btn { width: 14px; height: 14px; display: flex; items-center; justify-content: center; background: #334155; border-radius: 2px; font-size: 8px; font-weight: bold; }
.stepper-btn:hover { background: #475569; }
.add-anti-btn { background: #334155; color: #94a3b8; font-size: 9px; font-weight: bold; padding: 2px 8px; border-radius: 4px; margin-left: 4px; }
.add-anti-btn:hover { background: #475569; color: white; }
.anti-tag { display: inline-flex; align-items: center; background: #0f172a; border: 1px solid #334155; border-radius: 3px; padding: 1px 4px; gap: 4px; margin-right: 4px; margin-bottom: 4px; }
.anti-del { color: #ef4444; font-size: 10px; font-weight: bold; cursor: pointer; margin-left: 2px; }

.rating-btn { width: 48px; height: 48px; border-radius: 12px; border: 2px solid transparent; font-size: 18px; font-weight: 900; transition: all 0.2s; }
.rating-btn:hover { transform: scale(1.1); }

.grid-cols-6-fixed { grid-template-columns: repeat(6, minmax(0, 1fr)); }