/* ===== HUBPY Empire Game Styles ===== */

:root {
    --primary-blue: #4a6cf7;
    --primary-blue-light: #7c88d1;
    --primary-blue-dark: #2c4fd6;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --danger-red: #ef4444;
    --neutral-100: #f8fafc;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    --gradient-success: linear-gradient(135deg, var(--success-green) 0%, #22c55e 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: var(--neutral-100);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--primary-blue); }
    50% { box-shadow: 0 0 20px var(--primary-blue), 0 0 30px var(--primary-blue-light); }
}

@keyframes coinFlip {
    0% { transform: rotateY(0deg) scale(1); }
    25% { transform: rotateY(90deg) scale(0.8); }
    50% { transform: rotateY(180deg) scale(1.1); }
    75% { transform: rotateY(270deg) scale(0.9); }
    100% { transform: rotateY(360deg) scale(1); }
}

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

.animate-fadeIn { animation: fadeIn 0.6s ease-out; }
.animate-slideIn { animation: slideIn 0.8s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }

/* ===== HEADER STYLES ===== */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: #122437;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--neutral-700);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
}

.brand-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    min-width: 200px;
}

.game-title {
    margin: 0;
    line-height: 1;
}

.game-logo {
    height: 52px;
    width: auto;
    display: block;
}

.game-slogan {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
    opacity: 0.9;
    line-height: 1.2;
    white-space: nowrap;
}

.game-title-text {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-title i {
    color: var(--primary-blue);
    filter: drop-shadow(0 0 10px var(--primary-blue));
}

.player-level {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.level-badge {
    background: var(--gradient-success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.xp-bar {
    position: relative;
    background: var(--neutral-700);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    width: 150px;
}

.xp-fill {
    background: var(--gradient-success);
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.xp-text {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--neutral-400);
    white-space: nowrap;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.resource-panel {
    display: flex;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: nowrap;
    align-items: center;
}

.resource-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 80px;
}

.resource-item i {
    font-size: 1.2rem;
    color: var(--primary-blue-light);
}

.resource-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neutral-100);
}

.resource-label {
    font-size: 0.75rem;
    color: var(--neutral-400);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.header-right .game-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success-green);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--neutral-400);
    font-weight: 500;
}

/* ===== MAIN GAME CONTAINER ===== */
.game-container {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 1.5rem;
    padding: 2rem;
    min-height: calc(100vh - 120px);
}

/* ===== BUSINESS SHOP SIDEBAR ===== */
.business-shop {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.8s ease-out;
    height: fit-content;
}

.business-shop h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neutral-100);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-blue);
}

.shop-section {
    margin-bottom: 2rem;
}

.shop-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-200);
    margin-bottom: 1rem;
}

.business-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.business-card {
    background: var(--gradient-card);
    border: 1px solid var(--neutral-200);
    border-radius: 0.75rem;
    padding: 1rem;
    color: var(--neutral-800);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.business-card:hover::before {
    left: 100%;
}

.business-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-blue-light);
}

.business-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.card-icon {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.business-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--neutral-800);
}

.card-description {
    font-size: 0.8rem;
    color: var(--neutral-600);
    margin-bottom: 1rem;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.cost {
    color: var(--danger-red);
}

.income {
    color: var(--success-green);
}

.buy-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.buy-btn:disabled {
    background: var(--neutral-400);
    cursor: not-allowed;
}

.unlock-req {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    background: var(--warning-orange);
    color: white;
    text-align: center;
    padding: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-green);
    color: var(--success-green);
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.action-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateX(4px);
}

.action-btn small {
    display: block;
    color: var(--neutral-400);
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* ===== GAME BOARD ===== */
.game-board {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    animation: fadeIn 0.8s ease-out;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-blue);
}

.board-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neutral-100);
}

.board-controls {
    display: flex;
    gap: 1rem;
}

.control-btn {
    background: rgba(74, 108, 247, 0.1);
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue-light);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.control-btn:hover {
    background: rgba(74, 108, 247, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.control-btn[data-active="true"] {
    background: var(--gradient-primary);
    color: white;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    min-height: 400px;
}

.empty-slot {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed var(--neutral-600);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.empty-slot:hover {
    border-color: var(--primary-blue-light);
    background: rgba(74, 108, 247, 0.1);
    transform: scale(1.02);
}

.slot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--neutral-400);
    text-align: center;
}

.slot-content i {
    font-size: 2rem;
    opacity: 0.6;
}

.business-slot {
    background: var(--gradient-card);
    border: 2px solid var(--primary-blue-light);
    border-radius: 1rem;
    padding: 1rem;
    color: var(--neutral-800);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.business-slot:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.business-slot::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(74, 108, 247, 0.3), transparent);
    animation: spin 3s linear infinite;
    z-index: 1;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.business-content {
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.business-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.business-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.business-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.business-income {
    color: var(--success-green);
    font-weight: 600;
}

.business-level {
    color: var(--primary-blue);
    font-weight: 500;
}

.collect-btn {
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.collect-btn:hover {
    transform: scale(1.05);
    animation: none;
}

/* ===== GAME INFO SIDEBAR ===== */
.game-info {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.8s ease-out;
    height: fit-content;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--neutral-100);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--neutral-700);
}

.achievement-list,
.challenge-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.achievement,
.challenge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.achievement.unlocked,
.challenge.completed {
    border-color: var(--success-green);
    background: rgba(16, 185, 129, 0.1);
}

.achievement {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.achievement i {
    font-size: 1.5rem;
    color: var(--neutral-500);
}

.achievement.unlocked i {
    color: var(--success-green);
    filter: drop-shadow(0 0 10px var(--success-green));
}

.achievement-text h5 {
    color: var(--neutral-100);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.achievement-text p {
    color: var(--neutral-400);
    font-size: 0.8rem;
}

.challenge {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.challenge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
}

.challenge-text h5 {
    color: var(--neutral-100);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.challenge-text p {
    color: var(--neutral-400);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.challenge-reward {
    color: var(--success-green);
    font-size: 0.75rem;
    font-weight: 600;
}

.challenge-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    background: var(--neutral-700);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

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

.progress-text {
    color: var(--neutral-400);
    font-size: 0.75rem;
    font-weight: 500;
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
}

.news-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary-blue);
}

.news-icon {
    color: var(--primary-blue-light);
}

.news-text p {
    color: var(--neutral-200);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.news-text small {
    color: var(--neutral-500);
    font-size: 0.7rem;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--gradient-card);
    color: var(--neutral-800);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--neutral-200);
}

.modal-header h3 {
    font-weight: 600;
    color: var(--neutral-800);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--neutral-500);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--neutral-800);
}

.modal-body {
    padding: 1.5rem;
}

.decision-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.decision-option {
    background: rgba(74, 108, 247, 0.1);
    border: 2px solid var(--primary-blue-light);
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.decision-option:hover {
    background: rgba(74, 108, 247, 0.2);
    transform: translateY(-2px);
}

/* ===== NOTIFICATIONS ===== */
.notifications {
    position: fixed;
    top: 120px;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 999;
    pointer-events: none;
}

.notification {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    color: var(--neutral-800);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--success-green);
    box-shadow: var(--shadow-md);
    animation: slideIn 0.4s ease;
    pointer-events: auto;
    position: relative;
    max-width: 300px;
}

.notification.error {
    border-left-color: var(--danger-red);
}

.notification.warning {
    border-left-color: var(--warning-orange);
}

.notification.info {
    border-left-color: var(--primary-blue);
}

.notification-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--neutral-400);
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.notification-close:hover {
    opacity: 1;
}

/* ===== MOBILE HEADER BEHAVIOR ===== */
.mobile-header {
    display: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .game-container {
        grid-template-columns: 280px 1fr 280px;
        gap: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 1024px) {
    .game-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .business-shop,
    .game-info {
        order: 3;
    }

    .game-board {
        order: 2;
    }

    .resource-panel {
        flex-direction: column;
        gap: 0.75rem;
    }

    .resource-item {
        min-width: auto;
    }
}

@media (max-width: 1024px) {
    /* Hide desktop header completely on mobile and tablet */
    .game-header {
        display: none !important;
    }

    /* Show mobile header initially, then allow hiding */
    .mobile-header {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #122437;
        padding: 1rem 1rem 0.75rem 1rem;
        z-index: 1000;
        transform: translateY(0);
        transition: transform 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        min-height: 4rem;
    }

    .mobile-header.hide {
        transform: translateY(-100%);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .mobile-brand-left {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mobile-brand .game-logo {
        height: 44px;
    }

    /* Adjust for tablet view */
    @media (min-width: 769px) and (max-width: 1024px) {
        .mobile-header {
            padding: 1.25rem 2rem 1rem 2rem;
        }

        .mobile-brand .game-logo {
            height: 48px;
        }

        .mobile-brand .game-slogan {
            font-size: 0.65rem;
            letter-spacing: 0.5px;
        }

        .mobile-hide-btn {
            font-size: 1.3rem;
            padding: 0.5rem;
        }
    }

    .mobile-brand .game-slogan {
        font-size: 0.5rem;
        letter-spacing: 0.25px;
        white-space: nowrap;
    }

    /* Adjust main container to account for mobile header */
    .game-container {
        padding-top: 5.5rem !important;
        min-height: calc(100vh - 5.5rem);
        grid-template-columns: 1fr !important;
        gap: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 2rem;
    }

    /* Ensure business shop header is visible */
    .business-shop h3 {
        margin-top: 1rem;
        padding-top: 0.5rem;
    }

    /* Add extra spacing to first section on mobile */
    .business-shop {
        margin-top: 0.5rem;
    }

    /* Reorder sections for mobile */
    .business-shop {
        order: 1;
    }

    .game-board {
        order: 2;
    }

    .game-info {
        order: 3;
        margin-top: 2rem;
    }

    .business-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .notifications {
        right: 1rem;
        top: 5.5rem;
    }

    /* Mobile resource display */
    .mobile-resources {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0.75rem;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .mobile-resource-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .mobile-resource {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 0.5rem;
    }

    .mobile-resource i {
        color: var(--primary-blue-light);
        font-size: 1rem;
    }

    .mobile-resource span {
        color: var(--neutral-100);
        font-weight: 600;
        font-size: 0.9rem;
    }

    /* Add hide button to mobile header */
    .mobile-hide-btn {
        background: none;
        border: none;
        color: #94a3b8;
        font-size: 1.2rem;
        cursor: pointer;
        padding: 0.25rem;
        border-radius: 0.25rem;
        transition: all 0.3s ease;
    }

    .mobile-hide-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    /* Ensure buttons are easily tappable on mobile */
    .buy-btn {
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    /* Improve business card touch interactions */
    .business-card {
        touch-action: manipulation;
    }

    /* Mobile-specific business cards layout */
    .business-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Ensure business cards are properly sized for mobile */
    .business-card {
        padding: 1.25rem;
        min-height: 180px;
    }

    .business-card h5 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .card-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .card-stats {
        margin-bottom: 1rem;
        gap: 0.75rem;
    }

    /* Better spacing for mobile shop sections */
    .shop-section {
        margin-bottom: 2rem;
    }

    .shop-section h4 {
        margin-bottom: 1rem;
        font-size: 1.1rem;
    }

    /* Larger touch targets for mobile */
    .action-btn {
        min-height: 48px;
        touch-action: manipulation;
    }
}

@media (max-width: 1200px) {
    .game-container {
        grid-template-columns: 280px 1fr 280px;
        gap: 1rem;
        padding: 1rem;
    }

    .resource-panel {
        gap: 1rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .game-header {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }

    .game-logo {
        height: 48px;
    }

    .header-left {
        flex-shrink: 0;
        min-width: auto;
    }

    .header-center {
        flex: 1;
        min-width: 300px;
    }

    .header-right {
        flex-shrink: 0;
        min-width: auto;
    }

    .resource-panel {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.75rem;
        justify-content: center;
    }

    .resource-item {
        min-width: 60px;
    }

    .game-slogan {
        font-size: 0.65rem;
    }

    .notifications {
        right: 1rem;
        top: 140px;
    }

    .game-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .business-shop,
    .game-info {
        order: 3;
    }

    .game-board {
        order: 2;
    }
}

@media (max-width: 480px) {
    .business-grid {
        grid-template-columns: 1fr;
    }

    .resource-panel {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
}