/* ==========================================================================
   SHADOW BLADE: BUSHIDO DUEL — High-End Feudal Japanese Fighting UI
   Inspired by Shadow Fight 2: High-contrast silhouettes, dual health bars,
   damage lag drain bars, kanji typography, glowing neon accents, and modern HUD.
   ========================================================================== */

:root {
    --bg-dark: #09090b;
    --cyan-glow: #38bdf8;
    --crimson-glow: #ef4444;
    --gold-accent: #facc15;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-kanji: 'Cinzel', 'Trajan Pro', Georgia, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-main);
    color: #f4f4f5;
}

#game-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #18181b 0%, #09090b 100%);
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #000;
}

/* ==========================================================================
   TOP HEADER NAVIGATION BAR (Zero Overlap with Health Bars or Opponent Name)
   ========================================================================== */

#game-header-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 46px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    background: linear-gradient(180deg, rgba(9, 9, 11, 0.96) 0%, rgba(9, 9, 11, 0.8) 85%, transparent 100%);
    backdrop-filter: blur(12px);
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.header-brand {
    font-family: var(--font-kanji);
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-brand span {
    color: var(--gold-accent);
}

.room-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #d4d4d8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-btn {
    background: rgba(24, 24, 27, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e4e4e7;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hud-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--cyan-glow);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

/* ==========================================================================
   FIGHTING GAME TOP HUD (Dual Health Bars & Round Indicators)
   ========================================================================== */

#top-hud {
    position: absolute;
    top: 56px; /* Placed cleanly below header bar with zero opponent name collision */
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

/* Health Bar Containers */
.fighter-hud {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 42%;
}

.fighter-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fighter-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.fighter-kanji {
    font-family: var(--font-kanji);
    font-size: 1.1rem;
    opacity: 0.6;
}

.p1-hud .fighter-name {
    color: var(--cyan-glow);
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.p2-hud .fighter-name {
    color: var(--crimson-glow);
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
    flex-direction: row-reverse;
}

.p2-hud .fighter-info {
    flex-direction: row-reverse;
}

/* Round Win Medallions */
.round-dots {
    display: flex;
    gap: 8px;
}

.round-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    transition: all 0.3s ease;
}

.round-dot.won {
    background: var(--gold-accent);
    border-color: var(--gold-accent);
    box-shadow: 0 0 10px var(--gold-accent);
    transform: scale(1.15);
}

/* Health Bar Track & Lag Drain Fill */
.health-track {
    position: relative;
    height: 22px;
    background: rgba(24, 24, 27, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8), 0 4px 10px rgba(0, 0, 0, 0.5);
}

.p1-hud .health-track {
    transform: skewX(-12deg);
}

.p2-hud .health-track {
    transform: skewX(12deg);
}

.health-lag-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    background: #e11d48; /* Red damage drain */
    transition: width 0.4s ease-out;
}

.health-fill-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    transition: width 0.08s linear;
}

.p1-hud .health-fill-bar {
    left: 0;
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
}

.p2-hud .health-fill-bar {
    right: 0;
    background: linear-gradient(270deg, #dc2626 0%, #ef4444 100%);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
}

.p2-hud .health-lag-bar {
    right: 0;
}

/* Central Round Timer Box */
#timer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid var(--gold-accent);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.35);
    transform: translateY(-8px);
}

#round-timer {
    font-size: 2.6rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-kanji);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    line-height: 1;
}

/* ==========================================================================
   ANNOUNCER & COMBO POPUPS
   ========================================================================== */

#announcer-banner {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#announcer-banner.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.0);
}

.banner-title {
    font-family: var(--font-kanji);
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: 6px;
    color: #ffffff;
    text-shadow: 0 0 25px rgba(250, 204, 21, 0.8), 0 4px 15px rgba(0, 0, 0, 0.9);
    text-transform: uppercase;
}

.banner-sub {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--gold-accent);
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
    margin-top: 6px;
}

/* Combo Popup */
.combo-popup {
    position: absolute;
    top: 100px;
    font-size: 2rem;
    font-weight: 900;
    font-style: italic;
    color: var(--gold-accent);
    text-shadow: 0 0 15px rgba(250, 204, 21, 0.8), 2px 2px 0 #000;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.combo-popup.visible {
    opacity: 1;
    transform: scale(1.1);
}

#p1-combo { left: 45px; }
#p2-combo { right: 45px; }

/* ==========================================================================
   DESKTOP BOTTOM CONTROLS BAR & TOP ACTION BUTTONS
   ========================================================================== */

#controls-bar {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(9, 9, 11, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 8px 24px;
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #a1a1aa;
    z-index: 10;
    pointer-events: none;
}

.ctrl-item kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    margin-right: 4px;
}

/* ==========================================================================
   TOP HEADER NAVIGATION BAR (Zero Overlap with Health Bars)
   ========================================================================== */

#game-header-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: rgba(9, 9, 11, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 30;
}

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

.header-brand {
    font-family: var(--font-kanji);
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-brand span {
    color: var(--gold-accent);
}

.room-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #a1a1aa;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.hud-btn {
    background: rgba(24, 24, 27, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e4e4e7;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-btn:hover {
    background: rgba(39, 39, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    transform: translateY(-1px);
}

/* ==========================================================================
   INCOMING CHALLENGE APPROVAL MODAL (Host Accept/Decline)
   ========================================================================== */

#challenge-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(18px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 250;
    transition: opacity 0.25s ease;
}

#challenge-modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none !important;
    visibility: hidden !important;
}

.challenge-card {
    background: linear-gradient(145deg, #1c1917, #09090b);
    border: 2px solid var(--gold-accent);
    border-radius: 18px;
    padding: 36px 44px;
    width: 520px;
    max-width: 90vw;
    box-shadow: 0 0 45px rgba(250, 204, 21, 0.35), 0 20px 50px rgba(0, 0, 0, 0.9);
    text-align: center;
    animation: challengeGlow 2s infinite alternate;
}

@keyframes challengeGlow {
    from { box-shadow: 0 0 25px rgba(250, 204, 21, 0.25); }
    to { box-shadow: 0 0 50px rgba(250, 204, 21, 0.55); }
}

.challenge-icon {
    font-size: 3.5rem;
    margin-bottom: 8px;
}

.challenge-title {
    font-family: var(--font-kanji);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: #ffffff;
    margin-bottom: 8px;
}

.challenge-text {
    font-size: 1.1rem;
    color: #e4e4e7;
    margin-bottom: 24px;
    line-height: 1.5;
}

.challenger-highlight {
    color: var(--cyan-glow);
    font-weight: 800;
    font-size: 1.25rem;
}

.challenge-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.btn-accept-challenge {
    flex: 1;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
    transition: all 0.2s ease;
}

.btn-accept-challenge:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.6);
}

.btn-decline-challenge {
    flex: 1;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-decline-challenge:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
}

/* ==========================================================================
   PUBLIC DOJO MATCHMAKING LOBBY
   ========================================================================== */

#lobby-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(18px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    transition: opacity 0.3s ease;
}

#lobby-modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none !important;
    visibility: hidden !important;
}

.lobby-card {
    background: linear-gradient(145deg, #18181b, #09090b);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 32px 40px;
    width: 680px;
    max-width: 95vw;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 189, 248, 0.15);
}

/* Profile Bar */
.profile-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 20px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-label {
    color: #71717a;
    font-size: 0.85rem;
}

.profile-name {
    font-weight: 800;
    color: var(--cyan-glow);
    font-size: 1.15rem;
}

.btn-edit-name {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e4e4e7;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-name:hover {
    border-color: var(--cyan-glow);
    color: #ffffff;
}

/* Create Dojo Box */
.create-dojo-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.dojo-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
}

.dojo-input:focus {
    border-color: var(--gold-accent);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.3);
}

.btn-create-dojo {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    color: #000000;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-create-dojo:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.5);
}

/* Host Waiting State Banner */
#host-waiting-banner {
    background: rgba(250, 204, 21, 0.1);
    border: 1px dashed var(--gold-accent);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#host-waiting-banner.hidden {
    display: none;
}

.waiting-text {
    font-size: 0.95rem;
    color: var(--gold-accent);
    font-weight: 700;
}

/* Public Dojos List */
.public-dojos-header {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a1a1aa;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-dojos-container {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    padding-right: 6px;
}

.dojo-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.dojo-card:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateX(4px);
}

.dojo-card-info h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 2px;
}

.dojo-card-host {
    font-size: 0.8rem;
    color: #71717a;
}

.dojo-card-host strong {
    color: var(--cyan-glow);
}

.btn-challenge-dojo {
    background: var(--cyan-glow);
    color: #000000;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-challenge-dojo:hover {
    background: #7dd3fc;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.empty-dojos-msg {
    text-align: center;
    padding: 24px;
    color: #71717a;
    font-size: 0.88rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Guest Waiting Modal */
#guest-waiting-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 220;
}

#guest-waiting-modal.hidden {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.guest-waiting-card {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 28px 36px;
    text-align: center;
}

.lobby-title {
    font-family: var(--font-kanji);
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
    margin-bottom: 6px;
}

.lobby-sub {
    font-size: 0.95rem;
    color: #a1a1aa;
    margin-bottom: 28px;
}

.mode-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 16px 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.mode-btn:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: var(--cyan-glow);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.25);
    transform: translateY(-2px);
}

.mode-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.mode-info p {
    font-size: 0.8rem;
    color: #71717a;
}

.mode-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
}

.mode-btn:hover .mode-badge {
    background: var(--cyan-glow);
    color: #000;
}

/* Online Room Section */
.online-box {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 8px;
}

.room-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-family: monospace;
    font-size: 1rem;
    outline: none;
}

.room-input:focus {
    border-color: var(--cyan-glow);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.join-btn {
    background: var(--cyan-glow);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.join-btn:hover {
    background: #7dd3fc;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.ping-tag {
    margin-top: 16px;
    font-size: 0.8rem;
    color: #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ==========================================================================
   ARMORY & LOADOUT CUSTOMIZATION MODAL (Shadow Fight 2 Style)
   ========================================================================== */

#armory-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 210;
    transition: opacity 0.3s ease;
}

#armory-modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none !important;
    visibility: hidden !important;
}

.armory-card {
    background: linear-gradient(155deg, #18181b 0%, #09090b 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 32px 36px;
    width: 980px;
    max-width: 95vw;
    height: 85vh;
    max-height: 720px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(250, 204, 21, 0.15);
}

.armory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.armory-title {
    font-family: var(--font-kanji);
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(250, 204, 21, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.armory-kanji {
    font-size: 1.5rem;
    color: var(--gold-accent);
}

.armory-sub {
    font-size: 0.9rem;
    color: #a1a1aa;
    margin-top: 4px;
}

/* 2-Column Armory Layout */
.armory-body {
    flex: 1;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    overflow: hidden;
}

/* Left Column: Live Character Silhouette Preview */
.armory-preview-pane {
    background: radial-gradient(circle at center, #1e1e24 0%, #09090b 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

#armory-preview-canvas {
    width: 280px;
    height: 280px;
    display: block;
}

.fighter-loadout-summary {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.loadout-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.loadout-label {
    color: #71717a;
}

.loadout-val {
    color: #ffffff;
    font-weight: 700;
}

/* Right Column: Armory Tabs & Grid */
.armory-selection-pane {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.armory-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.armory-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #a1a1aa;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.armory-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.armory-tab-btn.active {
    background: var(--gold-accent);
    color: #000000;
    border-color: var(--gold-accent);
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.4);
}

.equipment-grid {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 8px;
}

.equipment-grid::-webkit-scrollbar {
    width: 6px;
}

.equipment-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
}

.equip-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.equip-card:hover {
    background: rgba(250, 204, 21, 0.06);
    border-color: rgba(250, 204, 21, 0.35);
    transform: translateX(4px);
}

.equip-card.selected {
    background: rgba(250, 204, 21, 0.12);
    border-color: var(--gold-accent);
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.25);
}

.equip-card-info h4 {
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    margin-bottom: 4px;
}

.equip-card-info .kanji {
    font-family: var(--font-kanji);
    color: var(--gold-accent);
    font-size: 1rem;
}

.equip-card-style {
    font-size: 0.8rem;
    color: #38bdf8;
    font-weight: 600;
    margin-bottom: 4px;
}

.equip-card-desc {
    font-size: 0.78rem;
    color: #a1a1aa;
    max-width: 420px;
    line-height: 1.4;
}

.equip-card-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e4e4e7;
}

.equip-card.selected .equip-card-badge {
    background: var(--gold-accent);
    color: #000000;
}

/* Armory Footer Action */
.armory-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.armory-duel-status {
    display: flex;
    align-items: center;
    gap: 14px;
}

.duel-timer-badge {
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid var(--gold-accent);
    color: var(--gold-accent);
    font-weight: 800;
    font-size: 0.95rem;
    padding: 6px 14px;
    border-radius: 9999px;
}

.opponent-ready-badge {
    font-size: 0.85rem;
    color: #a1a1aa;
    font-weight: 600;
}

.opponent-ready-badge.ready {
    color: #4ade80;
    font-weight: 800;
}

.armory-enter-btn {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    color: #000000;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
    transition: all 0.2s ease;
}

.armory-enter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 28px rgba(250, 204, 21, 0.6);
}
