* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.search-bar {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 120px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    border-radius: 4px;
    color: #333;
}

.pagination button:hover {
    background-color: #f0f0f0;
}

.pagination button:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.avatar-card {
    background: white;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.avatar-image {
    width: 200px;
    height: 130px;
    object-fit: contain;
    margin-bottom: 5px;
}

.type-indicator {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 5px;
    justify-content: center;
}

.type-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.currency-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 2px;
}

.avatar-price {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin: 4px 0;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.avatar-price:hover {
    background-color: #e0e0e0;
}

.avatar-name {
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 0.9em;
    color: #333;
}

.level-info {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 4px;
}

.stock-info {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.85em;2
    background-color: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #ddd;
    margin: 4px 0;
    width: fit-content;
}

.agotado {
    background-color: #f5f5f5;
    color: #999;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    width: 100%;
    margin-top: 10px;
}

.avatar-price {
    cursor: pointer;
    background-color: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.avatar-price:hover {
    background-color: #e0e0e0;
}


/* Header and profile dropdown styles */
#toggleMusicButton {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
}

#toggleMusicButton img {
    width: 18px;
    height: 18px;
}

.header-icons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 1rem;
    gap: 1.5rem;
}

#profileIcon {
    font-size: 1.1rem;
    color: #333;
}

.user-profile > i {
    font-size: 16px;
    color: #666;
    cursor: pointer;
}

.profile-dropdown {
    position: absolute;
    top: 40px;
    right: 0;
    background: white;
    border-radius: 12px;
    width: 240px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
    padding: 16px 0;
    z-index: 1000;
}

.profile-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 24px; /* Increased padding from 16px to 24px */
    gap: 12px;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    font-size: 18px;
    color: #666;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
}

.logout-button {
    display: flex;
    align-items: center;
    margin: 0 16px;
    padding: 12px 16px;
    background-color: #f1f3f5;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    border: none;
}

.logout-button i {
    margin-right: 12px;
    font-size: 20px;
    color: #666;
}

.profile-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
}

.profile-item i {
    margin-right: 12px;
    font-size: 20px;
    color: #666;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
}

.logout-container {
    padding: 0 16px;
}

#logoutButton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 0;
    background-color: #f1f3f5;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

#logoutButton i {
    margin-right: 8px;
    font-size: 20px;
}

.user-profile {
    position: relative;
}

.user-profile i {
    font-size: 20px;
    color: #666;
    cursor: pointer;
}

.profile-dropdown {
    position: absolute;
    top: 50px; /* Adjusted to match the image */
    right: 50%; /* Center the dropdown */
    transform: translateX(50%); /* Center the dropdown */
    background: white;
    border-radius: 12px;
    width: 240px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
    padding: 16px 0;
    z-index: 1000;
}

.profile-dropdown.show {
    display: block;
    right: 70px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

.dropdown-link i {
    margin-right: 12px;
    font-size: 20px;
    color: #666;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 12px 0;
}

.logout-button {
    display: flex;
    align-items: center;
    margin: 0 16px;
    padding: 12px 16px;
    background-color: #f1f3f5;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

.logout-button i {
    margin-right: 12px;
    font-size: 20px;
    color: #666;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
}

.logout {
    background-color: #f1f3f5;
    margin: 0 8px;
    border-radius: 8px;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.profile-icon i {
    font-size: 20px;
    color: #666;
}

.profile-dropdown {
    /* Clean up duplicate styles and update profile dropdown */
    .profile-dropdown {
        position: absolute;
        top: 30px;
        right: 0;
        background: white;
        border-radius: 8px;
        width: 200px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        display: none;
        padding: 8px 0;
        z-index: 1000;
    }
    
    .profile-dropdown.show {
        display: block;
    }
    
    .menu-item {
        display: flex;
        align-items: center;
        padding: 8px 16px;
        gap: 8px;
        cursor: pointer;
        color: #333;
        font-size: 14px;
    }
    
    .menu-item:hover {
        background-color: #f8f9fa;
    }
    
    .menu-item i {
        font-size: 16px;
        color: #666;
    }
    
    .divider {
        height: 1px;
        background-color: #eee;
        margin: 4px 0;
    }
    
    .logout-button {
        display: flex;
        align-items: center;
        margin: 4px 8px;
        padding: 8px 16px;
        background-color: #f8f9fa;
        border-radius: 6px;
        color: #333;
        font-size: 14px;
        cursor: pointer;
        border: none;
        width: calc(100% - 16px);
    }
    
    .logout-button:hover {
        background-color: #f1f3f5;
    }
    
    .logout-button i {
        margin-right: 8px;
        font-size: 16px;
        color: #666;
    }
}

.profile-dropdown .divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
    background-color: #f8f8f8;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #f1f3f5;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-avatar {
    width: 30px;
    height: 18px;
    border-radius: 0%;
}

.user-name {
    font-weight: bold;
    color: #333;
}

.user-currency {
    font-size: 0.9em;
    color: #666;
}

.edit-button {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.edit-button:hover {
    background-color: #f0f0f0;
}


/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .filters {
        flex-direction: column;
        gap: 8px;
    }

    .filter-select {
        width: 100%;
    }

    .avatar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .user-info {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .user-currency {
        margin: 4px 0;
    }

    .header-icons {
        padding: 0.5rem;
    }

    .profile-dropdown {
        right: 0;
        transform: none;
        width: 200px;
    }
}

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

    h1 {
        font-size: 1.5rem;
    }

    .user-info {
        font-size: 0.9em;
    }

    .avatar-card {
        width: 100%;
    }

    .avatar-image {
        width: 160px;
        height: 104px;
    }
}

.buy-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
}

.buy-button:hover {
    background-color: #45a049;
}

.avatar-price {
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s;
}

.avatar-price:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.avatar-price img {
    pointer-events: none;
}

.avatar-price span {
    pointer-events: none;
}

