/* Game Section Styles */
.game-container {
    background: rgba(255, 215, 0, 0.02);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    position: relative;
}

.game-stats {
    width: 100%;
    padding: 5px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.game-stats::after {
    content: "";
    display: table;
    clear: both;
}

.stat-item {
    float: left;
    width: 25%;
    text-align: center;
    box-sizing: border-box;
}

.stat-label {
    color: #888;
    font-size: 10px;
    display: block;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0px;
}

.stat-value {
    color: #00ff41;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff41;
    font-family: 'Courier New', monospace;
}

.game-main {
    width: 100%;
}

.game-main::after {
    content: "";
    display: table;
    clear: both;
}

/* Dealing Area */
.dealing-area {
    float: left;
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
}

.location-info {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

.location-name {
    color: #ffd700;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 8px #ffd700;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.location-details {
    font-size: 12px;
}

.location-details::after {
    content: "";
    display: table;
    clear: both;
}

.profit-rate {
    color: #00ff41;
    text-shadow: 0 0 4px #00ff41;
    float: left;
    width: 50%;
}

.heat-rate {
    color: #ff4444;
    text-shadow: 0 0 4px #ff4444;
    float: right;
    width: 50%;
}

.button-row {
    width: 100%;
    margin-bottom: 8px;
}

.button-row::after {
    content: "";
    display: table;
    clear: both;
}

.deal-button {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border: none;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
    float: left;
	font-size: 24px;
    width: 48%;
    margin-right: 1%;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.move-section {
    float: right;
    width: 48%;
}

.move-button {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: #fff;
    border: none;
    padding: 12px 8px;
    border-radius: 4px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0px;
    margin-bottom: 3px;
    width: 100%;
    box-sizing: border-box;
}

.move-cost {
    color: #888;
    font-size: 12px;
    text-align: center;
}

.auto-income {
    color: #00ff41;
    font-size: 16px;
    text-shadow: 0 0 5px #00ff41;
    margin-bottom: 8px;
    clear: both;
    text-align: center;
}

/* Upgrades Section */
.upgrades-section {
    float: left;
    width: 100%;
}

.upgrades-title {
    color: #ffd700;
    text-shadow: 0 0 8px #ffd700;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.upgrade-grid {
    width: 100%;
}

.upgrade-grid::after {
    content: "";
    display: table;
    clear: both;
}

.upgrade-item {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 5px;
    padding: 6px;
    float: left;
    width: 48%;
    margin-right: 4%;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.upgrade-item:nth-child(2n) {
    margin-right: 0;
}

.upgrade-item:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: #00ff41;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}

.upgrade-info {
    float: left;
    width: 60%;
}

.upgrade-name {
    color: #00ff41;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 2px;
    text-shadow: 0 0 4px #00ff41;
}

.upgrade-desc {
   color: #999;
   font-size: 14px;
   margin-bottom: 2px;
   float: left;
}

.upgrade-level {
   color: #999;
   font-size: 14px;
   float: right;
}

.upgrade-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    border: none;
    padding: 1.2em 6px;
    border-radius: 3px;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    float: right;
    width: 35%;
}

.upgrade-btn:hover {
    background: linear-gradient(45deg, #ffed4e, #ffd700);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.upgrade-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Location Selector Modal - Updated to stack header above grid */
.location-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.location-selector .selector-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    flex-shrink: 0;
}

.location-selector h3 {
    color: #ffd700;
    font-size: 24px;
    text-shadow: 0 0 20px #ffd700;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.close-selector {
    position: absolute;
    top: -10px;
    right: -10px;
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-selector:hover {
    color: #ff4444;
    transform: scale(1.2);
}

.location-grid {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    overflow-y: auto;
}

.location-card {
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    width: 30%;
    margin-right: 5%;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.location-card:nth-child(3n) {
    margin-right: 0;
}

.location-card:hover {
    border-color: #00ff41;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.4);
    transform: translateY(-5px);
}

.location-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.location-card.locked:hover {
    transform: none;
    box-shadow: none;
}

.location-card-name {
    color: #00ff41;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff41;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.location-stats div {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 5px;
}

.location-desc {
    color: #888 !important;
    font-style: italic;
    font-size: 12px !important;
    margin-top: 10px;
}

.location-locked {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 107, 107, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Warnings */
.heat-warning {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 107, 107, 0.95);
    color: #fff;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 1000;
    animation: pulse 2s infinite;
    font-family: 'Courier New', monospace;
}

.bust-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bustFlash 0.5s ease;
}

.bust-content {
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 3px solid #fff;
}

.bust-content h3 {
    color: #ff4444;
    font-size: 32px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #ff4444;
    font-family: 'Courier New', monospace;
}

.bust-content p {
    color: #fff;
    font-size: 18px;
    margin-bottom: 30px;
}

#continue-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes bustFlash {
    0% { background: rgba(255, 0, 0, 0); }
    50% { background: rgba(255, 0, 0, 1); }
    100% { background: rgba(255, 0, 0, 0.95); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .location-card {
        width: 48%;
        margin-right: 4%;
    }
    
    .location-card:nth-child(2n) {
        margin-right: 0;
    }
    
    .location-card:nth-child(3n) {
        margin-right: 4%;
    }
}

@media (max-width: 768px) {
    .game-container {
        padding: 15px;
    }
    
    .game-stats {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .stat-item {
        width: 50%;
        margin-bottom: 12px;
    }
    
    .location-info {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .location-name {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .location-details {
        font-size: 11px;
    }
    
    .deal-button {
        max-width: 200px;
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .auto-income {
        font-size: 12px;
        margin-bottom: 18px;
    }
    
    .move-button {
        padding: 12px 20px;
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .upgrades-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .upgrade-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .upgrade-name {
        font-size: 14px;
    }
    
    .upgrade-desc {
        font-size: 11px;
    }
    
    .location-card {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Mobile Optimized - ULTRA COMPACT */
@media (max-width: 480px) {
    .game-container {
        padding: 1px;
        margin-bottom: 2px;
        border-radius: 3px;
    }
    
    .game-stats {
        padding: 1px;
        margin-bottom: 1px;
        border-radius: 2px;
    }
    
    .stat-item {
        width: 25%;
        padding: 0px;
    }
    
    .stat-label {
        font-size: 16px;
        margin-bottom: 0px;
        letter-spacing: 0px;
    }
    
    .stat-value {
        font-size: 16px;
        text-shadow: none;
    }
    
    .dealing-area {
        text-align: left;
    }
    
    .location-info {
        padding: 5px;
        margin-bottom: 1px;
        border-radius: 2px;
    }
    
    .location-name {
        font-size: 16px;
        margin-bottom: 0px;
        letter-spacing: 0px;
        text-shadow: none;
    }
    
    .location-details {
        font-size: 14px;
    }
    
    .profit-rate, .heat-rate {
        text-shadow: none;
    }
    
    .button-row {
        margin-bottom: 1px;
    }
    
    .deal-button {
        width: 49%;
        padding: 5px;
        margin-bottom: 0px;
        border-radius: 2px;
        max-width: none;
    }
    
    .move-section {
        width: 49%;
    }
    
    .move-button {
        width: 100%;
        padding: 5px;
        font-size: 14px;
        margin-bottom: 1px;
        border-radius: 2px;
        letter-spacing: 0px;
    }
    
    .btn-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 100%;
        justify-content: center;
    }
    
    .deal-text {
        font-size: 14px;
        margin-bottom: 0px;
        letter-spacing: 0px;
    }
    
    .earn-amount {
        font-size: 13px;
    }
    
    .move-cost {
        font-size: 13px;
        margin: 0px;
    }
    
    .auto-income {
        font-size: 14px;
        margin-bottom: 1px;
        text-shadow: none;
    }
    
    .upgrades-title {
        font-size: 12px;
        margin-bottom: 1px;
        letter-spacing: 0px;
        text-shadow: none;
    }
    
    .upgrade-item {
        width: 49%;
        margin-right: 2%;
        margin-bottom: 2px;
        padding: 1px;
        border-radius: 1px;
        border-width: 1px;
    }
    
    .upgrade-item:nth-child(2n) {
        margin-right: 0;
    }
    
    .upgrade-name {
        font-size: 10px;
        margin-bottom: 0px;
        text-shadow: none;
    }
    
    .upgrade-desc {
        font-size: 10px;
        margin-bottom: 0px;
    }
    
    .upgrade-level {
        font-size: 10px;
        margin-bottom: 0px;
    }
    
    .upgrade-btn {
        padding: 5px 5px;
        font-size: 14px;
        min-width: 25px;
        min-height: 8px;
        border-radius: 1px;
    }
    
    /* Modal adjustments for mobile */
    .location-selector .selector-header {
        margin-bottom: 10px;
    }
    
    .location-selector h3 {
        font-size: 16px;
        letter-spacing: 0px;
        text-shadow: none;
    }
    
    .close-selector {
        font-size: 10px;
        top: -3px;
        right: -3px;
    }
    
    .location-grid {
        padding: 10px;
        max-height: 70vh;
    }
    
    .location-card {
        width: 30%;
        margin-right: 5%;
        margin-bottom: 1px;
        padding: 2px;
        border-radius: 1px;
        border-width: 1px;
    }
    
    .location-card:nth-child(3n) {
        margin-right: 0;
    }
    
    .location-card-name {
        font-size: 15px;
        margin-bottom: 0px;
        letter-spacing: 0px;
        text-shadow: none;
		padding:5px;
    }
    
    .location-stats div {
        font-size: 14px;
        margin-bottom: 0px;
		padding:5px;
    }
    
    .location-desc {
        font-size: 13px !important;
        margin-top: 0px;
    }
    
    .location-locked {
        padding: 0px 1px;
        font-size: 13px;
        top: 1px;
        right: 1px;
        border-radius: 0px;
    }
    
    /* Remove hover effects on mobile */
    .deal-button:hover, .deal-button:active {
        transform: none;
        box-shadow: none;
    }
    
    .move-button:hover, .move-button:active {
        transform: none;
        box-shadow: none;
    }
    
    .upgrade-btn:hover, .upgrade-btn:active {
        transform: none;
        box-shadow: none;
    }
    
    .upgrade-item:hover {
        background: rgba(0, 255, 65, 0.05);
        border-color: rgba(0, 255, 65, 0.3);
        box-shadow: none;
    }
    
    .location-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Heat warning - tiny */
    .heat-warning {
        top: 2px;
        padding: 1px 3px;
        border-radius: 1px;
        font-size: 15px;
    }
    
    /* Bust warning - compact */
    .bust-content {
        padding: 3px;
        border-radius: 2px;
        border-width: 1px;
    }
    
    .bust-content h3 {
        font-size: 18px;
        margin-bottom: 2px;
        text-shadow: none;
    }
    
    .bust-content p {
        font-size: 16px;
        margin-bottom: 3px;
    }
    
    #continue-btn {
        padding: 5px 5px;
        font-size: 15px;
        border-radius: 1px;
    }
}