/* [SITESECTION:1:variables] */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #ff003c;
    --primary-light: #ff4d6d;
    --primary-dark: #cc0030;
    --secondary: #0ff;
    --accent: #b400ff;
    --bg-deep: #0a0a0f;
    --bg-dark: #0a0a0f;
    --bg-dark-alt: #12121a;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --text-color: #e0e0e0;
    --text-muted: #888;
    --text-light: #ffffff;
    --gradient-neon: linear-gradient(135deg, #ff003c, #b400ff);
    --gradient-dark: linear-gradient(180deg, #0a0a0f, #12121a);
    --gradient-card: linear-gradient(180deg, #12121a, #0d0d15);
    --border-color: rgba(255, 0, 60, 0.15);
    --border-radius: 12px;
    --shadow-neon: 0 0 20px rgba(255, 0, 60, 0.3);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --top-bar-height: 56px;
    --bottom-nav-height: 60px;
    --color-own: #00e676;
    --color-enemy: #ff003c;
    --color-neutral: #555;
    --color-gang: #b400ff;
    --color-money: #ffd700;
    --color-energy: #00e5ff;
    --rarity-common: #888;
    --rarity-rare: #2196f3;
    --rarity-epic: #9c27b0;
    --rarity-legendary: #ffd700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-color);
    line-height: 1.5;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    width: 100%;
    position: fixed;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-light);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button {
    font-family: var(--font-body);
    border: none;
    outline: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

input, textarea {
    font-family: var(--font-body);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: var(--primary);
    color: white;
}

::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 60, 0.3);
    border-radius: 3px;
}
/* [/SITESECTION:1] */

/* [SITESECTION:2:layout] */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.loading-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 0, 60, 0.1);
    border: 2px solid var(--primary);
    font-size: 2rem;
    color: var(--primary);
    animation: pulse-glow 2s ease-in-out infinite;
}

.loading-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.loading-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin: 0 auto 16px;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: 30%;
    background: var(--gradient-neon);
    border-radius: 2px;
    animation: loading-progress 2s ease-in-out infinite;
}

.loading-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    animation: blink 1.5s ease-in-out infinite;
}

#game-app {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

#game-app.active {
    display: flex;
}
/* [/SITESECTION:2] */

/* [SITESECTION:3:header] */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--top-bar-height);
    padding: 0 12px;
    padding-top: var(--safe-top);
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    gap: 8px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.player-level-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-neon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 900;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.3);
}

.player-info-compact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.player-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

.xp-bar {
    width: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-neon);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.resource-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.resource-money {
    color: var(--color-money);
}

.resource-money i {
    color: var(--color-money);
    font-size: 0.7rem;
}

.resource-energy {
    color: var(--color-energy);
}

.resource-energy i {
    color: var(--color-energy);
    font-size: 0.7rem;
}

.online-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--color-own);
    padding: 4px 8px;
    background: rgba(0, 230, 118, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(0, 230, 118, 0.15);
}

.online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-own);
    animation: pulse-online 2s ease-in-out infinite;
}
/* [/SITESECTION:3] */

/* [SITESECTION:4:hero] */
#game-content {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: var(--top-bar-height);
    padding-bottom: var(--bottom-nav-height);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.game-panel {
    display: none;
    min-height: 100%;
    padding: 12px;
    animation: fadeIn 0.25s ease;
}

.game-panel.active {
    display: block;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header h2 i {
    color: var(--primary);
    font-size: 1rem;
}

.btn-game {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--gradient-neon);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-game:active {
    transform: scale(0.95);
}

.btn-game.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-game.btn-full {
    width: 100%;
    padding: 12px 20px;
}

.btn-game.btn-back {
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
}

.btn-game.btn-buy {
    background: linear-gradient(135deg, #00c853, #00e676);
}

.btn-game.btn-attack {
    background: linear-gradient(135deg, #ff003c, #ff4d6d);
}

.btn-game.btn-upgrade {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
}

.btn-game:disabled {
    opacity: 0.4;
    pointer-events: none;
}
/* [/SITESECTION:4] */

/* [SITESECTION:5:sections] */
.city-map-container {
    position: relative;
    width: 100%;
    padding: 8px 0;
}

.city-map-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 4px;
}

.district-zone {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    min-height: 90px;
}

.district-zone:active {
    transform: scale(0.97);
}

.district-zone[data-status="neutral"] {
    border-color: rgba(100, 100, 100, 0.3);
    background: linear-gradient(135deg, rgba(85, 85, 85, 0.08), var(--bg-card));
}

.district-zone[data-status="neutral"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-neutral);
}

.district-zone[data-status="own"] {
    border-color: rgba(0, 230, 118, 0.3);
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.08), var(--bg-card));
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.1);
}

.district-zone[data-status="own"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-own);
}

.district-zone[data-status="enemy"] {
    border-color: rgba(255, 0, 60, 0.3);
    background: linear-gradient(135deg, rgba(255, 0, 60, 0.08), var(--bg-card));
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.1);
}

.district-zone[data-status="enemy"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-enemy);
}

.district-zone[data-status="gang"] {
    border-color: rgba(180, 0, 255, 0.3);
    background: linear-gradient(135deg, rgba(180, 0, 255, 0.08), var(--bg-card));
    box-shadow: 0 0 15px rgba(180, 0, 255, 0.1);
}

.district-zone[data-status="gang"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-gang);
}

.district-zone-inner {
    padding: 12px 12px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    justify-content: center;
}

.district-zone-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.3px;
}

.district-zone-income {
    font-size: 0.7rem;
    color: var(--color-money);
    display: flex;
    align-items: center;
    gap: 4px;
}

.district-zone-income i {
    font-size: 0.6rem;
}

.district-zone-owner {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 0 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-own {
    background: var(--color-own);
}

.legend-enemy {
    background: var(--color-enemy);
}

.legend-neutral {
    background: var(--color-neutral);
}

.legend-gang {
    background: var(--color-gang);
}

.gang-status {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 16px;
}

.gang-status-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.gangs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gang-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.gang-card:active {
    transform: scale(0.98);
    border-color: var(--accent);
}

.gang-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(180, 0, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
    flex-shrink: 0;
}

.gang-info {
    flex-grow: 1;
    min-width: 0;
}

.gang-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gang-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

.gang-stats i {
    color: var(--primary-light);
    margin-right: 3px;
}

.gang-members-count {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    flex-shrink: 0;
}

.missions-tabs,
.shop-tabs,
.leaderboard-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.missions-tabs::-webkit-scrollbar,
.shop-tabs::-webkit-scrollbar,
.leaderboard-tabs::-webkit-scrollbar {
    display: none;
}

.mission-tab,
.shop-tab,
.lb-tab {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.mission-tab:active,
.shop-tab:active,
.lb-tab:active {
    transform: scale(0.95);
}

.mission-tab.active,
.shop-tab.active,
.lb-tab.active {
    background: var(--gradient-neon);
    border-color: transparent;
    color: white;
}

.missions-list,
.shop-list,
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mission-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    transition: var(--transition);
}

.mission-card:active {
    transform: scale(0.98);
}

.mission-type {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.mission-type i {
    margin-right: 4px;
}

.mission-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

.mission-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
}

.mission-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.progress-bar {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-neon);
    border-radius: 3px;
    transition: width 0.8s ease;
}

.progress-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    min-width: 35px;
    text-align: right;
}

.mission-reward {
    font-size: 0.8rem;
    color: var(--color-own);
    font-weight: 600;
}

.mission-reward i {
    margin-right: 4px;
    color: var(--color-money);
}

.mission-actions {
    margin-top: 10px;
}

.shop-item {
    background: var(--bg-card);
    border: 1px solid rgba(100, 100, 100, 0.2);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    position: relative;
}

.shop-item:active {
    transform: scale(0.98);
}

.shop-item[data-rarity="common"] {
    border-color: rgba(136, 136, 136, 0.2);
}

.shop-item[data-rarity="rare"] {
    border-color: rgba(33, 150, 243, 0.3);
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), var(--bg-card));
}

.shop-item[data-rarity="epic"] {
    border-color: rgba(156, 39, 176, 0.3);
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.05), var(--bg-card));
}

.shop-item[data-rarity="legendary"] {
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), var(--bg-card));
    animation: legendary-glow 3s ease-in-out infinite;
}

.shop-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.shop-item-info {
    flex-grow: 1;
    min-width: 0;
}

.shop-item-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
}

.shop-item-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.shop-item-bonus {
    font-size: 0.7rem;
    color: var(--color-own);
    margin-top: 2px;
}

.shop-item-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-money);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-rarity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-item[data-rarity="common"] .shop-rarity-badge {
    background: rgba(136, 136, 136, 0.2);
    color: var(--rarity-common);
}

.shop-item[data-rarity="rare"] .shop-rarity-badge {
    background: rgba(33, 150, 243, 0.15);
    color: var(--rarity-rare);
}

.shop-item[data-rarity="epic"] .shop-rarity-badge {
    background: rgba(156, 39, 176, 0.15);
    color: var(--rarity-epic);
}

.shop-item[data-rarity="legendary"] .shop-rarity-badge {
    background: rgba(255, 215, 0, 0.15);
    color: var(--rarity-legendary);
}

.lb-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition);
}

.lb-gold {
    border-color: rgba(255, 215, 0, 0.25);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.06), var(--bg-card));
}

.lb-silver {
    border-color: rgba(192, 192, 192, 0.25);
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.06), var(--bg-card));
}

.lb-bronze {
    border-color: rgba(205, 127, 50, 0.25);
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.06), var(--bg-card));
}

.lb-position {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

.lb-gold .lb-position { color: #ffd700; }
.lb-silver .lb-position { color: #c0c0c0; }
.lb-bronze .lb-position { color: #cd7f32; }

.lb-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-name i {
    margin-right: 6px;
}

.lb-gold .lb-name i { color: #ffd700; }
.lb-silver .lb-name i { color: #c0c0c0; }
.lb-bronze .lb-name i { color: #cd7f32; }

.lb-value {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
    white-space: nowrap;
}
/* [/SITESECTION:5] */

/* [SITESECTION:6:contact] */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    padding-bottom: var(--safe-bottom);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 0;
    min-width: 56px;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 500;
    background: none;
    border: none;
    transition: var(--transition);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
    font-size: 1.15rem;
    transition: var(--transition);
}

.bottom-nav-item span {
    transition: var(--transition);
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--gradient-neon);
    border-radius: 0 0 2px 2px;
}

.bottom-nav-item:active {
    transform: scale(0.9);
}
/* [/SITESECTION:6] */

/* [SITESECTION:7:footer] */
.district-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.district-modal.active {
    display: flex;
}

.district-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s ease;
}

.district-modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    background: var(--bg-dark-alt);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border: 1px solid var(--border-color);
    border-bottom: none;
    overflow-y: auto;
    animation: slideFromBottom 0.3s ease;
    padding-bottom: var(--safe-bottom);
}

.district-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-dark-alt);
    z-index: 1;
}

.district-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:active {
    background: rgba(255, 0, 60, 0.2);
    color: var(--primary);
}

.district-modal-body {
    padding: 16px 20px 20px;
}

.district-modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.modal-stat {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.modal-stat-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
}

.district-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.district-modal-actions .btn-game {
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
    border-radius: 10px;
}
/* [/SITESECTION:7] */

/* [SITESECTION:8:components] */
.gang-modal,
.gang-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.gang-modal.active,
.gang-detail-modal.active {
    display: flex;
}

.gang-modal-overlay,
.gang-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s ease;
}

.gang-modal-content,
.gang-detail-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    background: var(--bg-dark-alt);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border: 1px solid var(--border-color);
    border-bottom: none;
    overflow-y: auto;
    animation: slideFromBottom 0.3s ease;
    padding-bottom: var(--safe-bottom);
}

.gang-modal-header,
.gang-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-dark-alt);
    z-index: 1;
}

.gang-modal-header h3,
.gang-detail-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.gang-modal-body,
.gang-detail-body {
    padding: 16px 20px 20px;
}

.gang-detail-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.gang-detail-members {
    margin-bottom: 16px;
}

.gang-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.profile-card {
    text-align: center;
    padding: 24px 16px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(255, 0, 60, 0.1);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-light);
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-level {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-level span {
    color: var(--primary-light);
    font-weight: 700;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.profile-stat-item {
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-light);
    font-family: var(--font-heading);
}

.profile-section {
    margin-bottom: 16px;
}

.profile-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-family: var(--font-body);
}

.profile-section h4 i {
    color: var(--primary);
    font-size: 0.85rem;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.inventory-item {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.inventory-item:active {
    transform: scale(0.9);
}

.inventory-item-count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--text-light);
}

.toast-container {
    position: fixed;
    top: calc(var(--top-bar-height) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 24px);
    max-width: 400px;
    pointer-events: none;
}

.toast {
    padding: 12px 16px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    font-size: 0.8rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast.success {
    background: rgba(27, 94, 32, 0.9);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.toast.error {
    background: rgba(183, 28, 28, 0.9);
    border: 1px solid rgba(255, 0, 60, 0.3);
}

.toast.info {
    background: rgba(21, 101, 192, 0.9);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.toast.warning {
    background: rgba(230, 126, 0, 0.9);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.toast i {
    font-size: 1rem;
    flex-shrink: 0;
}

.notification-badge {
    position: fixed;
    top: calc(var(--top-bar-height) + 8px);
    right: 12px;
    z-index: 99;
}

.notification-bell {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.notification-bell:active {
    transform: scale(0.9);
}

.notification-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notification-count:empty,
.notification-count[data-count="0"] {
    display: none;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-item {
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideUp 0.3s ease;
    transition: var(--transition);
}

.notification-item.unread {
    border-color: rgba(255, 0, 60, 0.25);
    background: linear-gradient(90deg, rgba(255, 0, 60, 0.05), var(--bg-card));
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.notification-icon.type-attack {
    background: rgba(255, 0, 60, 0.15);
    color: var(--primary);
}

.notification-icon.type-capture {
    background: rgba(0, 230, 118, 0.15);
    color: var(--color-own);
}

.notification-icon.type-gang {
    background: rgba(180, 0, 255, 0.15);
    color: var(--accent);
}

.notification-icon.type-system {
    background: rgba(33, 150, 243, 0.15);
    color: #2196f3;
}

.notification-text {
    flex-grow: 1;
    min-width: 0;
}

.notification-text p {
    font-size: 0.8rem;
    color: var(--text-color);
    line-height: 1.4;
}

.notification-text p strong {
    color: var(--text-light);
}

.notification-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
    display: block;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.empty-state .empty-hint {
    font-size: 0.75rem;
    opacity: 0.6;
}

.empty-state.small {
    padding: 20px 16px;
}

.empty-state.small i {
    font-size: 1.5rem;
}

.empty-state.small p {
    font-size: 0.8rem;
}
/* [/SITESECTION:8] */

/* [SITESECTION:9:animations] */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideFromBottom {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 0, 60, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 0, 60, 0.5), 0 0 50px rgba(180, 0, 255, 0.2);
    }
}

@keyframes pulse-online {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(0, 230, 118, 0);
    }
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 60, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(255, 0, 60, 0); }
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
}

@keyframes pulse-purple {
    0%, 100% { box-shadow: 0 0 0 0 rgba(180, 0, 255, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(180, 0, 255, 0); }
}

@keyframes legendary-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.15); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.35); }
}

@keyframes loading-progress {
    0% { width: 10%; margin-left: 0; }
    50% { width: 60%; margin-left: 20%; }
    100% { width: 10%; margin-left: 90%; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes neon-border-pulse {
    0%, 100% { border-color: rgba(255, 0, 60, 0.15); }
    50% { border-color: rgba(255, 0, 60, 0.4); }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 0, 60, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 0, 60, 0.6), 0 0 40px rgba(180, 0, 255, 0.3);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.animate-shake {
    animation: shake 0.5s ease;
}
/* [/SITESECTION:9] */

/* [SITESECTION:10:responsive] */
@media (min-width: 500px) {
    .city-map-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .inventory-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 380px) {
    .top-bar {
        padding: 0 8px;
        gap: 4px;
    }

    .resource-badge {
        padding: 3px 7px;
        font-size: 0.7rem;
        gap: 3px;
    }

    .player-name {
        max-width: 60px;
        font-size: 0.7rem;
    }

    .xp-bar {
        width: 60px;
    }

    .player-level-badge {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }

    .online-indicator {
        padding: 3px 6px;
        font-size: 0.6rem;
    }

    .bottom-nav-item {
        min-width: 48px;
        font-size: 0.55rem;
    }

    .bottom-nav-item i {
        font-size: 1rem;
    }

    .city-map-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .district-zone {
        min-height: 78px;
    }

    .district-zone-name {
        font-size: 0.75rem;
    }

    .district-zone-income {
        font-size: 0.65rem;
    }

    .panel-header h2 {
        font-size: 0.95rem;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .district-modal-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

@media (max-width: 340px) {
    .resource-badge {
        padding: 2px 5px;
        font-size: 0.65rem;
    }

    .online-indicator {
        display: none;
    }

    .bottom-nav-item span {
        display: none;
    }

    .bottom-nav-item i {
        font-size: 1.2rem;
    }
}

@media (min-height: 700px) {
    .game-panel {
        padding: 16px;
    }
}

@media (hover: none) {
    .district-zone:hover,
    .gang-card:hover,
    .mission-card:hover,
    .shop-item:hover,
    .lb-row:hover,
    .notification-item:hover {
        transform: none;
        box-shadow: none;
    }

    .district-zone:active {
        transform: scale(0.97);
    }

    .gang-card:active,
    .mission-card:active,
    .shop-item:active {
        transform: scale(0.98);
    }

    .btn-game:active {
        transform: scale(0.95);
    }

    .bottom-nav-item:active {
        transform: scale(0.85);
    }

    .modal-close:active {
        transform: scale(0.9);
    }
}

@supports (padding-top: env(safe-area-inset-top)) {
    .top-bar {
        height: calc(var(--top-bar-height) + var(--safe-top));
    }

    #game-content {
        padding-top: calc(var(--top-bar-height) + var(--safe-top));
        padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
    }

    .bottom-nav {
        height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    }
}
/* [/SITESECTION:10] */