* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: white;
    min-height: 100vh;
    color: #333;
    padding: 1rem;
}

.main-container {
    display: flex;
    gap: 2rem;
    max-width: 100%;
    margin: 0 auto;
    height: 100vh;
    align-items: center;
}

.left-spacer {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
}

.inventory-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.center-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    min-width: 300px;
}

.click-counter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    min-width: 200px;
}

#clickCount {
    font-size: 2.2rem;
    display: inline-block;
    min-width: 60px;
}

.trophy-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.trophy {
    cursor: pointer;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: all 0.2s ease;
    width: 200px;
    height: 200px;
}

.trophy:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3)) brightness(1.1);
}

.trophy:active {
    transform: scale(0.95);
}

.equipped-section {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 1rem;
    width: 100%;
    max-width: 300px;
}

.equipped-section h3 {
    color: #667eea;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.equipped-container {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.equipped-slot {
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.equipped-slot:hover {
    border-color: #667eea;
    background-color: #f9f9f9;
}

.equipped-slot img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: contain;
}

.equipped-slot .dequip-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.8rem;
    display: none;
}

.equipped-slot:hover .dequip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.right-section {
    flex: 0 0 400px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 2rem;
}

.brawlers-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
    overflow-y: auto;
    padding: 1rem;
    max-height: 90vh;
}

.brawler-item {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brawler-item:hover {
    background-color: #e0e0e0;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brawler-info-left {
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price {
    font-size: 0.9rem;
    font-weight: bold;
    color: #667eea;
    margin: 0;
}

.brawler-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    flex: 0 0 auto;
    object-fit: contain;
}

.brawler-info-right {
    flex: 1;
    text-align: left;
}

.brawler-name {
    font-size: 0.85rem;
    font-weight: bold;
    color: #333;
    margin: 0 0 0.3rem 0;
}

.boost {
    font-size: 0.75rem;
    color: #666;
    margin: 0.2rem 0;
}

/* Brawler ALREADY BOUGHT State */
.brawler-item.already-bought {
    background-color: #ffcccc;
    opacity: 0.7;
}

.brawler-item.already-bought .price::after {
    content: " ALREADY BOUGHT";
    display: block;
    font-size: 0.65rem;
    color: red;
    font-weight: bold;
}

/* Inventory Modal */
.inventory-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
}

.inventory-modal.active {
    display: flex;
}

.inventory-panel {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.inventory-header h2 {
    color: #667eea;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inventory-item {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.inventory-item:hover {
    background-color: #e8e8e8;
}

.inventory-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.inventory-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: contain;
}

.inventory-item-info {
    flex: 1;
}

.inventory-item-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.3rem;
}

.inventory-item-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.inventory-item-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.inventory-item-action.dequip {
    background-color: #ff6b6b;
}

/* Confirmation Modal */
.confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.confirmation-modal.active {
    display: flex;
}

.confirmation-popup {
    background-color: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.confirmation-popup h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.confirmation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-confirm, .btn-cancel {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm {
    background-color: #51cf66;
    color: white;
}

.btn-confirm:hover {
    background-color: #40c057;
    transform: translateY(-2px);
}

.btn-cancel {
    background-color: #cccccc;
    color: #333;
}

.btn-cancel:hover {
    background-color: #bbbbbb;
    transform: translateY(-2px);
}

/* Scrollbar-Styling */
.brawlers-gallery::-webkit-scrollbar {
    width: 8px;
}

.brawlers-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.brawlers-gallery::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.brawlers-gallery::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

@media (max-width: 900px) {
    .main-container {
        gap: 1rem;
    }

    .left-spacer {
        flex: 0.5;
    }

    .brawlers-gallery {
        max-width: 280px;
    }
}

@media (max-width: 600px) {
    .main-container {
        flex-direction: column;
        height: auto;
    }

    .left-spacer {
        display: none;
    }

    .trophy {
        width: 150px;
        height: 150px;
    }

    .brawlers-gallery {
        max-width: 100%;
    }
}