/* Panel Layouts & Specific Components */

.panel {
    display: none;
    padding: 20px;
    padding-bottom: 120px;
    min-height: calc(100vh - 200px);
}

.panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Home Locations Grid */
.home-locations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 10px;
}

.location-card {
    background: var(--surface);
    border: 3px solid #4a4a4a;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.location-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px color-mix(in srgb, var(--primary) 40%, transparent);
    border-color: var(--primary);
}
.location-card.locked {
    opacity: 0.6;
    border-color: #f44336;
}

.location-card-icon {
    font-size: 64px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
}

.location-card-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.location-card-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
}

.location-card-status {
    font-size: 14px;
    color: #f44336;
    font-weight: bold;
    margin-top: 10px;
}

/* Inventory Slide Panel */
.slide-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--background);
    border-left: 3px solid var(--primary);
    z-index: 1500;
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
}

.slide-panel.open {
    transform: translateX(0);
}

.slide-panel-header {
    background: var(--surface);
    padding: 20px;
    border-bottom: 2px solid #4a4a4a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.slide-panel-header h3 {
    color: var(--primary);
    font-size: 20px;
    margin: 0;
}

.close-btn {
    background: #f44336;
    border: 2px solid #d32f2f;
    color: #fff;
    font-size: 20px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #d32f2f;
    transform: rotate(90deg);
}

.slide-panel-content {
    padding: 20px;
}

.inventory-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.inventory-tab {
    flex: 1;
    padding: 10px;
    background: var(--surface);
    border: 2px solid #4a4a4a;
    color: #999;
    cursor: pointer;
    text-align: center;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
}

.inventory-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #1a1a1a;
    font-weight: bold;
}

.inventory-money-display {
    background: linear-gradient(135deg, var(--surface) 0%, #3a4a3a 100%);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.inventory-item-card {
    background: var(--surface);
    border: 2px solid #4a4a4a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.inventory-item-card:hover {
    border-color: var(--primary);
}

.inventory-item-icon {
    font-size: 32px;
    flex-shrink: 0;
    cursor: pointer;
}

.inventory-item-details {
    flex: 1;
}

.inventory-item-name {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 5px;
}

.inventory-item-qty {
    color: #999;
    font-size: 14px;
}

.inventory-item-actions {
    display: flex;
    gap: 5px;
    flex-direction: column;
}

.storage-header {
    background: var(--background);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 3px solid var(--primary);
}

/* Location Content */
.location-content {
    padding: 20px 0;
}

.location-feature, .upgrade-offer {
    background: var(--surface);
    border: 2px solid #4a4a4a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.location-feature h3, .upgrade-offer h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 20px;
}

.upgrade-cost {
    font-size: 14px;
    margin: 15px 0;
    padding: 15px;
    background: var(--background);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.fireplace-status {
    background: var(--background);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid var(--primary);
}

.fireplace-status p {
    color: var(--primary);
    margin: 5px 0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .panel {
        padding-bottom: 140px;
    }

    .home-locations-grid, .zone-grid, .action-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
    }

    .slide-panel {
        width: 100%;
        right: 0;
    }

    .modal-content {
        padding: 20px;
    }
}