/* ===== LIVING ISOMETRIC CITY (PREMIUM MAFIA METROPOLIS) ===== */

.city-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - 240px);
    min-height: 460px;
    overflow: hidden;
    border-radius: 16px;
    margin-top: 6px;
    background: radial-gradient(ellipse at 50% 35%, #181d2f 0%, #0f121d 60%, #07090f 100%);
    border: 1px solid rgba(255, 215, 0, 0.15);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* City Background (Subtle ambient neon street grid) */
.city-bg {
    position: absolute;
    width: 200%;
    height: 200%;
    left: -50%;
    top: -50%;
    background: url('../assets/buildings/city_bg.png');
    background-size: 380px 380px;
    opacity: 0.35;
    mix-blend-mode: screen;
    transform: scale(var(--map-scale, 1));
    transition: transform 0.3s ease;
    pointer-events: none;
}

/* Buildings Container */
.city-buildings {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: scale(var(--map-scale, 1));
    transition: transform 0.3s ease;
}

/* Building on map */
.city-building {
    position: absolute;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center bottom;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.city-building:hover {
    transform: scale(1.08) translateY(-6px);
    filter: brightness(1.15);
    z-index: 120 !important;
}

.city-building:active {
    transform: scale(0.96);
}

.city-building img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px var(--building-glow, rgba(0, 229, 255, 0.3)));
    transition: filter 0.2s ease;
}

/* Glowing isometric district platform base */
.building-platform {
    position: absolute;
    bottom: -6px;
    width: 100%;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, var(--building-glow, rgba(255, 215, 0, 0.4)) 0%, transparent 70%);
    opacity: 0.7;
    pointer-events: none;
    z-index: -1;
    animation: platformPulse 3s infinite alternate;
}

@keyframes platformPulse {
    0% { opacity: 0.5; transform: scale(0.95); }
    100% { opacity: 0.85; transform: scale(1.1); }
}

/* Building positions with balanced isometric depth */
.building-hq {
    left: 50%;
    top: 33%;
    transform: translateX(-50%);
    width: 135px;
    height: 165px;
    z-index: 50;
    --building-glow: rgba(255, 215, 0, 0.5);
}

.building-casino {
    left: 10%;
    top: 50%;
    width: 110px;
    height: 125px;
    z-index: 65;
    --building-glow: rgba(236, 72, 153, 0.6);
}

.building-club {
    right: 10%;
    top: 50%;
    width: 110px;
    height: 125px;
    z-index: 65;
    --building-glow: rgba(168, 85, 247, 0.6);
}

.building-warehouse {
    right: 14%;
    top: 17%;
    width: 105px;
    height: 115px;
    z-index: 30;
    --building-glow: rgba(249, 115, 22, 0.5);
}

.building-bank {
    left: 14%;
    top: 17%;
    width: 105px;
    height: 115px;
    z-index: 30;
    --building-glow: rgba(16, 185, 129, 0.5);
}

.building-docks {
    left: 50%;
    top: 67%;
    transform: translateX(-50%);
    width: 125px;
    height: 120px;
    z-index: 80;
    --building-glow: rgba(6, 182, 212, 0.6);
}

/* Level badge */
.level-badge {
    position: absolute;
    top: 0px;
    right: 6px;
    background: linear-gradient(135deg, #ffd700, #f59e0b);
    color: #111;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 11px;
    border: 2px solid #111;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.7);
    z-index: 10;
}

/* Production indicator badge */
.prod-badge {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 15, 25, 0.9);
    border: 1px solid #00ff88;
    color: #00ff88;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.4);
    z-index: 10;
    letter-spacing: 0.5px;
}

/* Building Name Pill */
.building-title-pill {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 7, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffd700;
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* Special Casino Animated Marquee */
.casino-marquee {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff0077, #7928ca);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 0 12px #ff0077;
    animation: pulse 1.4s infinite;
    white-space: nowrap;
    border: 1px solid #ffd700;
}

/* === LIGHTS & PARTICLES === */
.lights-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.street-light {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
    box-shadow: 0 0 16px 8px rgba(255, 215, 0, 0.3);
    animation: lightPulse 2.5s ease-in-out infinite;
}

@keyframes lightPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; box-shadow: 0 0 22px 10px rgba(255, 215, 0, 0.45); }
}

.particles-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 229, 255, 0.6);
    border-radius: 50%;
    animation: floatUp 6s linear infinite;
}

@keyframes floatUp {
    from { bottom: -10px; opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    to { bottom: 110%; opacity: 0; }
}

/* === TOP CONTROLS (NON-BLOCKING) === */
.city-view-toggle {
    position: absolute;
    top: 12px;
    left: 14px;
    display: flex;
    gap: 6px;
    z-index: 90;
}

.city-view-btn {
    background: rgba(15, 20, 30, 0.88);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.city-view-btn.active {
    background: #ffd700;
    border-color: #ffd700;
    color: #111;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

/* Zoom controls placed at TOP RIGHT so they NEVER collide with bottom nav */
.zoom-controls {
    position: absolute;
    top: 12px;
    right: 14px;
    display: flex;
    flex-direction: row;
    gap: 6px;
    z-index: 90;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    background: rgba(15, 20, 30, 0.88);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 215, 0, 0.5);
    color: #ffd700;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.15s ease;
}

.zoom-btn:active {
    background: #ffd700;
    color: #111;
    transform: scale(0.92);
}

/* === SLIDE-UP BUILDING INSPECTOR PANEL === */
.city-info-panel {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(16, 20, 32, 0.96);
    backdrop-filter: blur(12px);
    border: 2px solid #ffd700;
    border-radius: 16px;
    padding: 14px 16px;
    width: 90%;
    max-width: 340px;
    z-index: 150;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 215, 0, 0.2);
    display: none;
}

.city-info-panel.active {
    display: block;
    animation: panelSlideUp 0.25s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes panelSlideUp {
    from {
        transform: translateX(-50%) translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.panel-title {
    font-size: 15px;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 0.5px;
}

.panel-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.panel-close:hover {
    color: #fff;
}

.panel-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 8px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
    font-size: 10px;
    color: #aaa;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 14px;
    font-weight: 900;
}

.stat-value.gold { color: #ffd700; }
.stat-value.green { color: #00ff88; }