/* map.css - Roguelike map, shop, reward, collection screens */

/* Map scene */
#scene-map {
    background: radial-gradient(ellipse at 50% 50%, rgba(15,15,40,0.8) 0%, var(--bg-dark) 80%);
    justify-content: flex-start;
    padding: 16px;
}
.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin-bottom: 12px;
}
.map-floor-info {
    font-size: 18px;
    font-weight: 700;
}
.map-floor-info span { color: var(--gold); }
.map-gold {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--gold);
}
.map-gold img { width: 20px; height: 20px; }
.map-deck-btn {
    font-size: 12px;
}
.map-container {
    width: 100%;
    max-width: 800px;
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 20px;
}
.map-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    position: relative;
}
.map-node {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background: var(--panel-bg);
    border: 2px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.map-node:hover { border-color: var(--gold); transform: scale(1.08); }
.map-node.completed { opacity: 0.4; border-color: rgba(100,100,100,0.3); pointer-events: none; }
.map-node.current { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,215,0,0.3); }
.map-node.locked { opacity: 0.3; pointer-events: none; }
.map-node-icon { font-size: 24px; margin-bottom: 2px; }
.map-node-label { font-size: 9px; color: var(--text-dim); text-transform: uppercase; }
.map-node.battle .map-node-icon { color: var(--hp-red); }
.map-node.elite .map-node-icon { color: var(--legendary); }
.map-node.shop .map-node-icon { color: var(--gold); }
.map-node.rest .map-node-icon { color: var(--nature); }
.map-node.event .map-node-icon { color: var(--water); }
.map-node.boss .map-node-icon { color: #ff3333; }
.map-node.boss { border-color: rgba(255,50,50,0.4); }
.map-line {
    position: absolute;
    background: rgba(255,255,255,0.08);
    z-index: -1;
}

/* Shop scene */
#scene-shop {
    background: radial-gradient(ellipse at 50% 40%, rgba(40,30,10,0.6) 0%, var(--bg-dark) 70%);
    justify-content: flex-start;
    padding: 20px;
}
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin-bottom: 16px;
}
.shop-title { font-size: 28px; font-weight: 900; color: var(--gold); }
.shop-items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    max-width: 800px;
    margin-bottom: 20px;
}
.shop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--panel-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.shop-item:hover { border-color: var(--gold); transform: translateY(-2px); }
.shop-item.sold { opacity: 0.3; pointer-events: none; }
.shop-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 4px;
}
.shop-remove {
    width: 160px;
    padding: 16px;
    text-align: center;
}
.shop-remove-title { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }

/* Reward scene */
#scene-reward {
    background: radial-gradient(ellipse at 50% 40%, rgba(40,40,10,0.5) 0%, var(--bg-dark) 70%);
}
.reward-title { font-size: 24px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.reward-subtitle { font-size: 14px; color: var(--text-dim); margin-bottom: 20px; }
.reward-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.reward-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.reward-card-wrapper:hover { transform: translateY(-6px); }
.reward-card-wrapper .game-card { width: 150px; height: 210px; }
.reward-card-wrapper .game-card .card-art-area { height: 80px; }
.reward-card-wrapper .game-card .card-art-area img { max-width: 74px; max-height: 74px; }
.reward-card-wrapper .game-card .card-name { font-size: 12px; }
.reward-card-wrapper .game-card .card-desc { font-size: 10px; max-height: 32px; }
.reward-card-wrapper .game-card .card-stats { font-size: 13px; }

/* Collection/deck viewer overlay */
.deck-viewer {
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: var(--panel-bg);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
}
.deck-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.deck-viewer-title { font-size: 20px; font-weight: 700; }
.deck-viewer-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.deck-viewer-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* Event scene */
#scene-event {
    background: radial-gradient(ellipse at 50% 40%, rgba(20,30,50,0.6) 0%, var(--bg-dark) 70%);
}
.event-content {
    max-width: 500px;
    text-align: center;
    padding: 30px;
}
.event-title { font-size: 24px; font-weight: 700; margin-bottom: 12px; color: var(--water); }
.event-desc { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-bottom: 24px; }
.event-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.event-choice {
    padding: 12px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    font-size: 14px;
}
.event-choice:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--gold);
}
.event-choice-result { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* Rest scene */
#scene-rest {
    background: radial-gradient(ellipse at 50% 50%, rgba(20,40,20,0.5) 0%, var(--bg-dark) 70%);
}
.rest-content { text-align: center; max-width: 500px; }
.rest-title { font-size: 24px; font-weight: 700; color: var(--nature); margin-bottom: 12px; }
.rest-desc { font-size: 14px; color: var(--text-dim); margin-bottom: 24px; }
.rest-options {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.rest-option {
    width: 180px;
    padding: 20px;
    background: var(--panel-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.rest-option:hover { border-color: var(--gold); transform: translateY(-3px); }
.rest-option-icon { font-size: 36px; margin-bottom: 8px; }
.rest-option-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.rest-option-desc { font-size: 12px; color: var(--text-dim); }

@media(max-width:640px){
    #scene-map{padding:10px}
    .map-header{flex-wrap:wrap;gap:6px;margin-bottom:8px}
    .map-floor-info{font-size:16px}
    .map-gold{font-size:14px}
    .map-gold img{width:18px;height:18px}
    .map-deck-btn{font-size:13px;min-height:44px}
    .map-container{padding:6px;gap:16px}
    .map-node{width:62px;height:62px;border-radius:10px;min-width:52px;min-height:52px}
    .map-node:active{transform:scale(0.95)}
    .map-node-icon{font-size:24px}
    .map-node-label{font-size:10px}
    .map-row{gap:14px}
    .shop-items{gap:10px}
    .shop-item{padding:10px;min-width:100px}
    .shop-price{font-size:14px}
    .shop-title{font-size:22px}
    .shop-remove{width:min(160px,80vw)}
    .reward-title{font-size:20px}
    .reward-subtitle{font-size:13px}
    .reward-cards{gap:10px}
    .rest-options{flex-direction:column;gap:12px;align-items:center}
    .rest-option{width:min(200px,85vw);padding:16px}
    .rest-option-name{font-size:16px}
    .rest-option-desc{font-size:13px}
    .rest-option-icon{font-size:32px}
    .event-content{padding:16px;max-width:95vw}
    .event-title{font-size:20px}
    .event-desc{font-size:14px;line-height:1.5}
    .event-choice{padding:12px 16px;font-size:14px;min-height:52px}
    .event-choice-result{font-size:12px}
    .deck-viewer{width:96%;padding:12px}
    .deck-viewer-title{font-size:18px}
}
@media(max-width:400px){
    .map-node{width:56px;height:56px;min-width:48px;min-height:48px}
    .map-node-icon{font-size:22px}
    .map-row{gap:10px}
    .shop-item{min-width:90px;padding:8px}
}
